/* Unicode Detector — CharacterCounter.com */

/* PAGE LAYOUT: follows the newer tool-page content width and sidebar grid */
.unicode-detector-page {
    width: 100%;
    padding: 105px 15px 30px;
    color: #333;
    font-family: "Roboto", Arial, sans-serif;
}

.unicode-detector-page,
.unicode-detector-page *,
.unicode-detector-page *::before,
.unicode-detector-page *::after {
    box-sizing: border-box;
}

.unicode-detector-page [hidden] {
    display: none !important;
}

.unicode-detector-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 28px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.unicode-detector-main,
.unicode-detector-sidebar {
    width: 100%;
    min-width: 0;
}

/* PAGE HEADING */
.ud-heading {
    margin: 0 0 20px;
    text-align: center;
}

.ud-heading h1 {
    margin: 0 0 9px;
    padding: 0;
    color: #333;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
    overflow-wrap: break-word;
}

.ud-intro {
    max-width: 720px;
    margin: 0 auto;
    color: #555;
    font-size: 17px;
    line-height: 1.5;
}

.ud-notice {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #e3cf9b;
    border-radius: 7px;
    background: #fff9eb;
    color: #665022;
    font-size: 14px;
    line-height: 1.5;
}

/* INPUT */
.ud-input-section {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dce1e7;
    border-radius: 7px;
    background: #fff;
}

.ud-input-heading {
    margin: 0 0 10px;
}

.ud-input-label {
    display: block;
    margin: 0 0 5px;
    color: #333;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
}

.ud-input-heading p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.45;
}

.ud-textarea {
    display: block;
    width: 100%;
    min-width: 0;
    height: 230px;
    min-height: 50px;
    padding: 14px 13px;
    border: 1px solid #cbd1d8;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font: 16px/1.5 "Roboto", Arial, sans-serif;
    resize: vertical;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ud-textarea::placeholder {
    color: #7a828c;
    opacity: 1;
}

.ud-textarea:hover {
    border-color: #aeb6bf;
}

.ud-textarea:focus {
    border-color: #1a73e8;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.14);
}

.ud-input-help {
    margin: 6px 0 0;
    color: #666;
    font-size: 13px;
    line-height: 1.45;
}

/* RESULT METRIC CARDS: match the newer Find and Replace card treatment */
.ud-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin: 14px 0 0;
}

.ud-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 72px;
    padding: 10px 8px;
    border: 1px solid #dce1e7;
    border-radius: 7px;
    background: #f7f8fa;
    text-align: center;
}

.ud-stat-label {
    color: #666;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;
}

.ud-stat-value {
    max-width: 100%;
    color: #1a73e8;
    font-size: 23px;
    line-height: 1.15;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.ud-status {
    min-height: 19px;
    margin: 8px 0 12px;
    color: #666;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: break-word;
}

/* RESULT PANELS */
.ud-workspace {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
    width: 100%;
}

.ud-result-panel {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dce1e7;
    border-radius: 7px;
    background: #fff;
}

.ud-panel-heading {
    margin: 0 0 10px;
}

.ud-panel-heading h2 {
    margin: 0 0 5px;
    color: #333;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
}

.ud-panel-heading p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.45;
}

.ud-highlighted-output {
    height: 230px;
    min-height: 160px;
    max-height: 360px;
    overflow: auto;
    padding: 12px;
    border: 1px solid #e1e5ea;
    border-radius: 6px;
    background: #f7f8fa;
    color: #333;
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ud-unicode-highlight {
    border-radius: 3px;
    background: #ffdc55;
    color: #1b1b1b;
    box-shadow: 0 0 0 2px #c58a00;
    font-weight: 600;
}

.ud-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ud-character-table {
    width: 100%;
    border-collapse: collapse;
    color: #333;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
}

.ud-character-table th,
.ud-character-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #e6e9ed;
    vertical-align: top;
}

.ud-character-table th {
    color: #666;
    font-size: 12px;
    font-weight: 600;
}

.ud-character-table th:first-child,
.ud-character-table td:first-child {
    padding-left: 0;
}

.ud-character-table th:last-child,
.ud-character-table td:last-child {
    padding-right: 0;
}

.ud-character-cell {
    min-width: 44px;
    color: #174ea6;
    font-size: 17px;
    font-weight: 600;
}

.ud-character-table code {
    color: #333;
    font: 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
    white-space: nowrap;
}

.ud-count-cell {
    font-variant-numeric: tabular-nums;
}

.ud-position-cell {
    min-width: 92px;
    color: #555;
    overflow-wrap: anywhere;
}

.ud-empty-state {
    padding: 16px 6px !important;
    color: #666;
    text-align: center;
}

.ud-position-note {
    margin: 9px 0 0;
    color: #777;
    font-size: 11px;
    line-height: 1.4;
}

.ud-definition {
    margin: 12px 0 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

/* SEO ARTICLE */
.ud-content {
    width: 100%;
    min-width: 0;
    margin-top: 34px;
    color: #333;
    font-size: 17px;
    line-height: 1.7;
    text-align: left;
    overflow-wrap: break-word;
}

.ud-content h2 {
    margin: 25px 0 10px;
    color: #333;
    font-size: 25px;
    line-height: 1.35;
    font-weight: 700;
}

.ud-content h2:first-child {
    margin-top: 0;
}

.ud-content h3 {
    margin: 20px 0 7px;
    color: #333;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
}

.ud-content p,
.ud-content li {
    color: #444;
    font-size: 17px;
    line-height: 1.7;
}

.ud-content ol {
    padding-left: 22px;
}

.ud-content li {
    margin: 0 0 5px;
}

.ud-content a {
    color: #1155cc;
    text-decoration: none;
}

.ud-content a:hover {
    text-decoration: underline;
}

/* SIDEBAR AD SLOT */
.unicode-detector-sidebar {
    min-height: 1px;
}

/* TABLET */
@media only screen and (max-width: 1100px) {
    .unicode-detector-layout {
        grid-template-columns: minmax(0, 1fr);
        max-width: 900px;
    }

    .unicode-detector-sidebar {
        display: none;
    }
}

@media only screen and (max-width: 760px) {
    .unicode-detector-page {
        padding-top: 96px;
    }

    .ud-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .ud-content {
        margin-top: 29px;
        font-size: 16px;
    }

    .ud-content p,
    .ud-content li {
        font-size: 16px;
    }

    .ud-content h2 {
        font-size: 22px;
    }

    .ud-content h3 {
        font-size: 18px;
    }
}

/* MOBILE */
@media only screen and (max-width: 520px) {
    .unicode-detector-page {
        padding: 88px 12px 24px;
    }

    .ud-heading {
        margin-bottom: 17px;
    }

    .ud-heading h1 {
        font-size: 27px;
    }

    .ud-intro {
        font-size: 15px;
    }

    .ud-textarea {
        height: 205px;
        padding: 12px;
    }

    .ud-highlighted-output {
        height: 205px;
    }

    .ud-stats {
        gap: 7px;
    }

    .ud-stat {
        min-height: 68px;
        padding: 9px 5px;
    }

    .ud-stat-label {
        font-size: 12px;
    }

    .ud-stat-value {
        font-size: 22px;
    }

    .ud-result-panel {
        padding: 12px;
    }

    .ud-character-table th,
    .ud-character-table td {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .ud-content h2 {
        font-size: 21px;
    }
}

/* NARROW PHONES */
@media only screen and (max-width: 390px) {
    .unicode-detector-page {
        padding-right: 8px;
        padding-left: 8px;
    }

    .ud-stats {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .ud-stat {
        min-height: 48px;
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 11px;
        text-align: left;
    }

    .ud-stat-value {
        flex: 0 0 auto;
        margin-left: 12px;
    }

    .ud-character-table {
        min-width: 400px;
    }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .ud-textarea {
        transition: none;
    }
}