/* ====================================================
   Writing Checker Tool — style.css
   Prefix: wc-
   ==================================================== */

/* Container */
.wc-container {
    max-width: 820px;
    margin: 0 auto;
}

/* ── Feature Banner ── */
.wc-feature-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 12px;
}

.wc-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.5;
}

.wc-feature-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1.2;
}

.wc-feature-item strong {
    display: block;
    font-size: 12.5px;
    color: #1b5e20;
}

.wc-feature-item p {
    margin: 2px 0 0;
    color: #4e6b51;
    font-size: 11px;
}

/* ── Input Section ── */
.wc-input-section {
    margin-bottom: 20px;
}

.wc-input-section>label {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
    color: #1b2e1c;
}

.wc-input-section textarea {
    width: 100%;
    min-height: 200px;
    padding: 14px;
    border: 2px solid #c8e6c9;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.8;
    resize: vertical;
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    transition: border-color .2s;
    box-sizing: border-box;
    color: #263238;
}

.wc-input-section textarea:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, .12);
}

.wc-input-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.wc-input-stats {
    margin-top: 6px;
    font-size: 12.5px;
    color: #607d8b;
}

/* ── Buttons ── */
.wc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s;
    font-family: inherit;
}

.wc-btn:active {
    transform: scale(.97);
}

.wc-btn-primary {
    background: #2e7d32;
    color: #fff;
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 15.5px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(46, 125, 50, .25);
    margin-bottom: 20px;
}

.wc-btn-primary:hover {
    background: #1b5e20;
    box-shadow: 0 4px 14px rgba(27, 94, 32, .30);
}

.wc-btn-sample {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
}

.wc-btn-sample:hover {
    background: #c8e6c9;
}

.wc-btn-clear {
    background: #fafafa;
    color: #78909c;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.wc-btn-clear:hover {
    background: #f5f5f5;
    color: #d32f2f;
    border-color: #ef9a9a;
}

/* ── Section Cards ── */
.wc-card {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.wc-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1b2e1c;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
}

/* ── Ratio Bar Chart ── */
.wc-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.wc-bar-label {
    width: 68px;
    font-size: 13px;
    font-weight: 600;
    color: #37474f;
    flex-shrink: 0;
    text-align: right;
}

.wc-bar-track {
    flex: 1;
    height: 22px;
    background: #eceff1;
    border-radius: 6px;
    overflow: hidden;
}

.wc-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

.wc-bar-kanji {
    background: #5c6bc0;
}

.wc-bar-hiragana {
    background: #66bb6a;
}

.wc-bar-katakana {
    background: #ffa726;
}

.wc-bar-alnum {
    background: #42a5f5;
}

.wc-bar-other {
    background: #bdbdbd;
}

.wc-bar-value {
    width: 42px;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    color: #455a64;
    flex-shrink: 0;
}

.wc-bar-count {
    font-size: 11px;
    color: #90a4ae;
    flex-shrink: 0;
    min-width: 48px;
}

.wc-ratio-verdict {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    background: #f5f5f5;
    line-height: 1.6;
}

.wc-verdict-good {
    color: #2e7d32;
    font-weight: 700;
}

.wc-verdict-warn {
    color: #e65100;
    font-weight: 700;
}

.wc-verdict-bad {
    color: #c62828;
    font-weight: 700;
}

.wc-ratio-verdict small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #78909c;
}

/* ── Duplicate Check View ── */
.wc-dupe-summary {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
}

.wc-dupe-ok {
    color: #2e7d32;
}

.wc-dupe-warn {
    color: #c62828;
}

.wc-dupe-view {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 6px;
    background: #fafafa;
}

.wc-sentence-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 2px;
    font-size: 13.5px;
    line-height: 1.7;
    transition: background .15s;
}

.wc-sentence-num {
    font-size: 11px;
    color: #b0bec5;
    flex-shrink: 0;
    min-width: 22px;
    text-align: right;
}

.wc-sentence-text {
    flex: 1;
    color: #263238;
}

.wc-sentence-tag {
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 4px;
}

.wc-hl-red {
    background: rgba(244, 67, 54, 0.08);
    border-left: 3px solid #f44336;
}

.wc-hl-red .wc-sentence-tag {
    color: #c62828;
    background: rgba(244, 67, 54, .12);
}

.wc-hl-orange {
    background: rgba(255, 152, 0, 0.08);
    border-left: 3px solid #ff9800;
}

.wc-hl-orange .wc-sentence-tag {
    color: #e65100;
    background: rgba(255, 152, 0, .12);
}

.wc-hl-purple {
    background: rgba(156, 39, 176, 0.08);
    border-left: 3px solid #9c27b0;
}

.wc-hl-purple .wc-sentence-tag {
    color: #6a1b9a;
    background: rgba(156, 39, 176, .12);
}

/* ── Pattern List ── */
.wc-pattern-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.wc-pattern-text {
    width: 95px;
    font-size: 14px;
    font-weight: 600;
    color: #37474f;
    flex-shrink: 0;
    text-align: right;
}

.wc-pattern-count {
    width: 48px;
    font-size: 12px;
    color: #78909c;
    flex-shrink: 0;
    text-align: right;
}

.wc-pattern-bar {
    flex: 1;
    height: 16px;
    background: #eceff1;
    border-radius: 4px;
    overflow: hidden;
}

.wc-pattern-fill {
    height: 100%;
    background: #2e7d32;
    border-radius: 4px;
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

/* ── Advanced Settings ── */
.wc-advanced {
    margin-bottom: 20px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.wc-advanced summary {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #37474f;
    background: #fafafa;
    cursor: pointer;
    user-select: none;
}

.wc-advanced summary:hover {
    background: #f5f5f5;
}

.wc-advanced-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wc-setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wc-setting-row label {
    font-size: 13.5px;
    color: #455a64;
    min-width: 180px;
}

.wc-setting-row select,
.wc-setting-row input[type="number"] {
    padding: 6px 10px;
    border: 1.5px solid #cfd8dc;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    font-family: inherit;
}

.wc-setting-row select:focus,
.wc-setting-row input[type="number"]:focus {
    outline: none;
    border-color: #2e7d32;
}

.wc-range-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #607d8b;
}

.wc-range-inputs input[type="number"] {
    width: 62px;
    text-align: center;
}

/* ── Auto Toggle ── */
.wc-auto-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #546e7a;
    cursor: pointer;
    margin-top: 8px;
}

.wc-auto-toggle input {
    accent-color: #2e7d32;
}

/* ── Alerts ── */
.wc-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.wc-alert-error {
    background: #fbe9e7;
    color: #bf360c;
    border: 1px solid #ffab91;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .wc-feature-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wc-bar-count {
        display: none;
    }

    .wc-btn-primary {
        font-size: 14px;
    }

    .wc-bar-label {
        width: 56px;
        font-size: 12px;
    }

    .wc-setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .wc-feature-banner {
        grid-template-columns: 1fr;
    }

    .wc-pattern-text {
        width: 75px;
        font-size: 12px;
    }
}