/**
 * 나이스(NEIS) 글자수 계산기 스타일
 * 카테고리: text
 * 슬러그: neis-character-counter
 *
 * @package Zipper
 */

#neisCharacterCounterTool {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#neisCharacterCounterTool .neis-layout-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#neisCharacterCounterTool .neis-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

#neisCharacterCounterTool .neis-panel-span-full {
    grid-column: 1 / -1;
}

#neisCharacterCounterTool .neis-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #faf9f7;
    border: 1px solid #ebe5dc;
    border-radius: 16px;
}

#neisCharacterCounterTool .neis-input-panel {
    background: linear-gradient(180deg, #faf9f7 0%, #fffdfa 100%);
}

#neisCharacterCounterTool .neis-panel-head,
#neisCharacterCounterTool .neis-section-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#neisCharacterCounterTool .neis-panel-title,
#neisCharacterCounterTool .neis-section-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #2d2a26;
}

#neisCharacterCounterTool .neis-panel-title i,
#neisCharacterCounterTool .neis-section-head h3::before {
    color: #d4af37;
}

#neisCharacterCounterTool .neis-panel-desc,
#neisCharacterCounterTool .neis-section-head p,
#neisCharacterCounterTool .neis-hero-desc,
#neisCharacterCounterTool .neis-rule-desc,
#neisCharacterCounterTool .neis-share-summary,
#neisCharacterCounterTool .neis-share-detail {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #5f5a56;
}

#neisCharacterCounterTool .neis-control-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#neisCharacterCounterTool .neis-control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

#neisCharacterCounterTool .neis-control-label {
    font-size: 13px;
    font-weight: 700;
    color: #6f675f;
}

#neisCharacterCounterTool .neis-school-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

#neisCharacterCounterTool .neis-school-tab {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #e3dccf;
    border-radius: 12px;
    background: #fff;
    color: #5f5a56;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#neisCharacterCounterTool .neis-school-tab:hover,
#neisCharacterCounterTool .neis-school-tab:focus-visible {
    outline: none;
    transform: translateY(-1px);
    border-color: rgba(212, 175, 55, 0.48);
    box-shadow: 0 10px 24px rgba(84, 73, 47, 0.08);
}

#neisCharacterCounterTool .neis-school-tab.is-active {
    background: rgba(212, 175, 55, 0.14);
    border-color: rgba(212, 175, 55, 0.42);
    color: #7a5b00;
}

#neisCharacterCounterTool .neis-select {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #e3dccf;
    border-radius: 12px;
    background: #fff;
    color: #2d2a26;
    font-size: 14px;
}

#neisCharacterCounterTool .neis-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14);
}

#neisCharacterCounterTool .neis-textarea-wrap {
    display: flex;
}

#neisCharacterCounterTool #neisInputText {
    width: 100%;
    min-height: 208px;
    max-height: 260px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #2d2a26;
    background: #fff;
    border: 1px solid #e5dfd4;
    border-radius: 14px;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#neisCharacterCounterTool #neisInputText:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14);
}

#neisCharacterCounterTool .neis-input-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#neisCharacterCounterTool .neis-meta-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 10px;
    background: #fff;
    color: #5f5a56;
    font-size: 12px;
    line-height: 1.45;
    border: 1px solid #eee8df;
}

#neisCharacterCounterTool .neis-meta-pill i {
    color: #d4af37;
}

#neisCharacterCounterTool .neis-input-panel .tool-actions {
    justify-content: flex-start;
}

#neisCharacterCounterTool .neis-hero-panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(255, 255, 255, 0.96) 100%);
    border-color: rgba(212, 175, 55, 0.28);
}

#neisCharacterCounterTool .neis-hero-panel::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -50px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0) 72%);
    pointer-events: none;
}

#neisCharacterCounterTool .neis-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#neisCharacterCounterTool .neis-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.14);
    color: #8e6b00;
    font-size: 12px;
    font-weight: 700;
}

#neisCharacterCounterTool .neis-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e4dac2;
    color: #6b6256;
    font-size: 12px;
    font-weight: 700;
}

#neisCharacterCounterTool .neis-status-badge[data-tone="ok"] {
    background: rgba(89, 171, 121, 0.12);
    border-color: rgba(89, 171, 121, 0.22);
    color: #2d7a4b;
}

#neisCharacterCounterTool .neis-status-badge[data-tone="near"] {
    background: rgba(212, 175, 55, 0.16);
    border-color: rgba(212, 175, 55, 0.28);
    color: #8e6b00;
}

#neisCharacterCounterTool .neis-status-badge[data-tone="over"] {
    background: rgba(227, 105, 105, 0.12);
    border-color: rgba(227, 105, 105, 0.24);
    color: #b44747;
}

#neisCharacterCounterTool .neis-status-badge[data-tone="unlimited"] {
    background: rgba(120, 153, 255, 0.12);
    border-color: rgba(120, 153, 255, 0.24);
    color: #4560bd;
}

#neisCharacterCounterTool .neis-status-badge[data-tone="idle"] {
    background: #fff;
    border-color: #e4dac2;
    color: #6b6256;
}

#neisCharacterCounterTool .neis-hero-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
}

#neisCharacterCounterTool .neis-hero-primary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

#neisCharacterCounterTool .neis-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#neisCharacterCounterTool .neis-hero-title {
    font-size: 20px;
    line-height: 1.35;
    color: #2d2a26;
}

#neisCharacterCounterTool .neis-hero-value {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    min-width: 0;
}

#neisCharacterCounterTool .neis-hero-value strong {
    font-size: clamp(42px, 6vw, 64px);
    line-height: 1;
    letter-spacing: -0.04em;
    color: #2d2a26;
}

#neisCharacterCounterTool .neis-hero-unit {
    padding-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #8c8579;
}

#neisCharacterCounterTool .neis-hero-caption {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6b6256;
}

#neisCharacterCounterTool .neis-countdown-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(224, 214, 195, 0.92);
    box-shadow: 0 14px 28px rgba(84, 73, 47, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

#neisCharacterCounterTool .neis-countdown-card.is-down {
    border-color: rgba(212, 175, 55, 0.42);
    box-shadow: 0 18px 34px rgba(212, 175, 55, 0.14);
    transform: translateY(-1px);
}

#neisCharacterCounterTool .neis-countdown-card.is-up {
    border-color: rgba(89, 171, 121, 0.32);
    box-shadow: 0 18px 34px rgba(89, 171, 121, 0.14);
    transform: translateY(-1px);
}

#neisCharacterCounterTool .neis-countdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#neisCharacterCounterTool .neis-countdown-label,
#neisCharacterCounterTool .neis-countdown-caption {
    font-size: 12px;
    color: #8c8579;
}

#neisCharacterCounterTool .neis-countdown-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e7dfd1;
    font-size: 12px;
    font-weight: 700;
    color: #6b6256;
}

#neisCharacterCounterTool .neis-countdown-state[data-tone="ok"] {
    color: #2d7a4b;
    background: rgba(89, 171, 121, 0.12);
    border-color: rgba(89, 171, 121, 0.22);
}

#neisCharacterCounterTool .neis-countdown-state[data-tone="near"] {
    color: #8e6b00;
    background: rgba(212, 175, 55, 0.16);
    border-color: rgba(212, 175, 55, 0.28);
}

#neisCharacterCounterTool .neis-countdown-state[data-tone="over"] {
    color: #b44747;
    background: rgba(227, 105, 105, 0.12);
    border-color: rgba(227, 105, 105, 0.24);
}

#neisCharacterCounterTool .neis-countdown-state[data-tone="unlimited"] {
    color: #4560bd;
    background: rgba(120, 153, 255, 0.12);
    border-color: rgba(120, 153, 255, 0.24);
}

#neisCharacterCounterTool .neis-countdown-state[data-tone="idle"] {
    color: #6b6256;
    background: #fff;
    border-color: #e7dfd1;
}

#neisCharacterCounterTool .neis-countdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#neisCharacterCounterTool .neis-countdown-metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

#neisCharacterCounterTool .neis-countdown-value-wrap {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    min-width: 0;
}

#neisCharacterCounterTool .neis-countdown-value {
    min-width: 0;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1;
    letter-spacing: -0.03em;
    color: #2d2a26;
}

#neisCharacterCounterTool .neis-countdown-value.is-animating {
    animation: neisCountdownPulse 0.35s ease;
}

#neisCharacterCounterTool .neis-countdown-unit {
    padding-bottom: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #8c8579;
}

#neisCharacterCounterTool .neis-countdown-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#neisCharacterCounterTool .neis-countdown-track {
    position: relative;
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(233, 226, 214, 0.86);
}

#neisCharacterCounterTool .neis-countdown-fill {
    position: absolute;
    inset: 0 auto 0 0;
    display: block;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #65be83 0%, #86d49f 100%);
    transition: width 0.28s ease, background 0.28s ease;
}

#neisCharacterCounterTool .neis-countdown-card[data-tone="near"] .neis-countdown-fill {
    background: linear-gradient(90deg, #ddb858 0%, #efcf77 100%);
}

#neisCharacterCounterTool .neis-countdown-card[data-tone="over"] .neis-countdown-fill {
    background: linear-gradient(90deg, #e56f6f 0%, #ef9797 100%);
}

#neisCharacterCounterTool .neis-countdown-card[data-tone="unlimited"] .neis-countdown-fill {
    background: linear-gradient(90deg, rgba(120, 153, 255, 0.54) 0%, rgba(120, 153, 255, 0.16) 100%);
}

@keyframes neisCountdownPulse {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

#neisCharacterCounterTool .neis-hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

#neisCharacterCounterTool .neis-hero-metric,
#neisCharacterCounterTool .neis-quick-card,
#neisCharacterCounterTool .neis-rule-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 14px;
    background: #fff;
    border: 1px solid #ece5d9;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(84, 73, 47, 0.05);
}

#neisCharacterCounterTool .neis-hero-label,
#neisCharacterCounterTool .neis-quick-label,
#neisCharacterCounterTool .neis-rule-title {
    font-size: 12px;
    color: #8c8579;
}

#neisCharacterCounterTool .neis-hero-metric strong,
#neisCharacterCounterTool .neis-quick-value {
    font-size: 19px;
    color: #2d2a26;
}

#neisCharacterCounterTool .neis-hero-metric {
    padding: 12px;
}

#neisCharacterCounterTool .neis-hero-label {
    font-size: 11px;
}

#neisCharacterCounterTool .neis-hero-metric strong {
    font-size: 16px;
}

#neisCharacterCounterTool .neis-quick-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}

#neisCharacterCounterTool .neis-quick-card {
    gap: 6px;
    padding: 10px 8px;
}

#neisCharacterCounterTool .neis-quick-label {
    font-size: 10px;
}

#neisCharacterCounterTool .neis-quick-value {
    font-size: 15px;
}

#neisCharacterCounterTool .neis-limit-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

#neisCharacterCounterTool .neis-limit-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #ece5d9;
    border-radius: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#neisCharacterCounterTool .neis-limit-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(84, 73, 47, 0.08);
}

#neisCharacterCounterTool .neis-limit-item.is-focus {
    border-color: rgba(212, 175, 55, 0.44);
    box-shadow: 0 16px 30px rgba(212, 175, 55, 0.12);
}

#neisCharacterCounterTool .neis-limit-item.is-ok .neis-limit-status {
    color: #2d7a4b;
}

#neisCharacterCounterTool .neis-limit-item.is-ok .neis-limit-bar {
    background: linear-gradient(90deg, #65be83 0%, #86d49f 100%);
}

#neisCharacterCounterTool .neis-limit-item.is-near .neis-limit-status {
    color: #8e6b00;
}

#neisCharacterCounterTool .neis-limit-item.is-near .neis-limit-bar {
    background: linear-gradient(90deg, #ddb858 0%, #efcf77 100%);
}

#neisCharacterCounterTool .neis-limit-item.is-over .neis-limit-status {
    color: #b44747;
}

#neisCharacterCounterTool .neis-limit-item.is-over .neis-limit-bar {
    background: linear-gradient(90deg, #e56f6f 0%, #ef9797 100%);
}

#neisCharacterCounterTool .neis-limit-item.is-unlimited {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
    border-color: rgba(120, 153, 255, 0.24);
}

#neisCharacterCounterTool .neis-limit-item.is-unlimited .neis-limit-status {
    color: #4560bd;
}

#neisCharacterCounterTool .neis-limit-header,
#neisCharacterCounterTool .neis-limit-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

#neisCharacterCounterTool .neis-limit-name {
    display: block;
    font-size: 15px;
    color: #2d2a26;
}

#neisCharacterCounterTool .neis-limit-caption,
#neisCharacterCounterTool .neis-limit-usage,
#neisCharacterCounterTool .neis-limit-feedback {
    font-size: 12px;
    line-height: 1.5;
    color: #7c746b;
}

#neisCharacterCounterTool .neis-limit-status {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
}

#neisCharacterCounterTool .neis-limit-progress {
    position: relative;
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #f1ece3;
}

#neisCharacterCounterTool .neis-limit-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #65be83 0%, #86d49f 100%);
    transition: width 0.25s ease;
}

#neisCharacterCounterTool .neis-limit-item.is-unlimited .neis-limit-progress {
    background: linear-gradient(90deg, rgba(120, 153, 255, 0.14) 0%, rgba(120, 153, 255, 0.04) 100%);
}

#neisCharacterCounterTool .neis-limit-item.is-unlimited .neis-limit-bar {
    width: 100%;
    background: linear-gradient(90deg, rgba(120, 153, 255, 0.54) 0%, rgba(120, 153, 255, 0.16) 100%);
}

#neisCharacterCounterTool .neis-rule-list {
    display: grid;
    gap: 8px;
}

#neisCharacterCounterTool .neis-rule-title {
    font-weight: 700;
}

#neisCharacterCounterTool .neis-copy-panel .tool-actions {
    justify-content: flex-end;
}

#neisCharacterCounterTool .neis-share-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eee8df;
}

#neisCharacterCounterTool .neis-share-summary {
    font-weight: 700;
    color: #2d2a26;
}

#neisCharacterCounterTool .neis-empty-note {
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px dashed #ddd5c7;
    color: #7c746b;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

@media (max-width: 1100px) {
    #neisCharacterCounterTool .neis-quick-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    #neisCharacterCounterTool .neis-limit-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    #neisCharacterCounterTool .neis-dashboard-grid {
        grid-template-columns: 1fr;
    }

    #neisCharacterCounterTool .neis-hero-main,
    #neisCharacterCounterTool .neis-input-meta {
        grid-template-columns: 1fr;
    }

    #neisCharacterCounterTool .neis-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #neisCharacterCounterTool .neis-limit-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #neisCharacterCounterTool .neis-panel {
        padding: 18px;
    }

    #neisCharacterCounterTool .neis-school-tabs,
    #neisCharacterCounterTool .neis-countdown-grid,
    #neisCharacterCounterTool .neis-hero-metrics,
    #neisCharacterCounterTool .neis-quick-grid,
    #neisCharacterCounterTool .neis-input-meta {
        grid-template-columns: 1fr;
    }

    #neisCharacterCounterTool .neis-hero-top,
    #neisCharacterCounterTool .neis-countdown-head,
    #neisCharacterCounterTool .neis-limit-header,
    #neisCharacterCounterTool .neis-limit-foot {
        flex-direction: column;
        align-items: flex-start;
    }

    #neisCharacterCounterTool .neis-hero-value strong {
        font-size: clamp(40px, 14vw, 60px);
    }

    #neisCharacterCounterTool .tool-actions {
        width: 100%;
        flex-direction: column;
    }

    #neisCharacterCounterTool .tool-actions .tool-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #neisCharacterCounterTool #neisInputText {
        min-height: 180px;
        max-height: 220px;
        padding: 16px;
    }

    #neisCharacterCounterTool .neis-panel,
    #neisCharacterCounterTool .neis-share-preview {
        border-radius: 14px;
    }
}
