/**
 * Factor Calculator Styles
 * Localized styles for the English factor calculator
 *
 * @package Zipper
 */

.facc-hidden {
    display: none !important;
}

.facc-intro {
    display: grid;
    gap: 8px;
}

#faccCalculator .tool-layout-split {
    grid-template-columns: minmax(0, 350px) minmax(0, 1fr);
    gap: 18px;
}

#faccCalculator .tool-layout-input {
    max-width: 350px;
}

.facc-lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #5f5a56;
}

.facc-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

.facc-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.facc-section-title,
.facc-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.facc-section-title i,
.facc-subtitle i,
.facc-live-pill i,
.facc-disclaimer i {
    color: #d4af37;
}

.facc-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.facc-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.facc-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 100%;
    box-sizing: border-box;
}

.facc-input-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
}

.facc-amount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.facc-amount-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 46px;
    padding: 11px 13px;
    font-size: 15px;
    font-weight: 500;
    color: #2d2a26;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.facc-amount-input:hover {
    border-color: #d4c67a;
}

.facc-amount-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.facc-amount-input::placeholder {
    font-weight: 400;
    color: #c4c0bc;
}

.facc-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 9px;
    border: 1px solid #e8e4dc;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.facc-input-hint {
    font-size: 12px;
    color: #7a756d;
    line-height: 1.5;
}

.facc-preset-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.facc-preset-btn {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #fff;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.facc-preset-btn:hover,
.facc-preset-btn.is-active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
}

.facc-btn-group {
    display: flex;
    gap: 8px;
}

.facc-btn-group.is-realtime {
    display: grid;
}

.facc-btn-group .tool-btn {
    width: 100%;
}

.facc-tip-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
    color: #5f5a56;
    font-size: 14px;
    line-height: 1.6;
}

.facc-tip-section {
    gap: 12px;
}

.facc-waiting {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 18px 16px;
    border: 1px solid #f1d6bf;
    border-radius: 12px;
    background: #fff8f1;
    color: #9e6f46;
}

.facc-waiting i {
    font-size: 28px;
    color: #d4af37;
    opacity: 0.7;
}

.facc-waiting p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

.facc-result-hero {
    display: grid;
    gap: 10px;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 1px solid #eadfb8;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.14);
}

.facc-result-hero.is-prime {
    border-color: rgba(99, 179, 130, 0.35);
    box-shadow: 0 10px 24px rgba(99, 179, 130, 0.14);
}

.facc-result-hero.is-unit {
    border-color: rgba(93, 112, 175, 0.28);
    box-shadow: 0 10px 24px rgba(93, 112, 175, 0.12);
}

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

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

.facc-status-badge.is-example {
    background: rgba(212, 175, 55, 0.14);
    color: #8a6500;
}

.facc-status-badge.is-composite {
    background: rgba(212, 175, 55, 0.18);
    color: #8a6500;
}

.facc-status-badge.is-prime {
    background: rgba(99, 179, 130, 0.16);
    color: #2d7a4e;
}

.facc-status-badge.is-unit {
    background: rgba(93, 112, 175, 0.16);
    color: #4054a8;
}

.facc-status-badge.is-warning {
    background: rgba(220, 80, 80, 0.12);
    color: #b34242;
}

.facc-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(212, 175, 55, 0.24);
    border-radius: 10px;
    background: #fff;
    color: #8a6500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.facc-copy-btn:hover {
    transform: translateY(-1px);
    border-color: #d4af37;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.16);
}

.facc-hero-value {
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #2d2a26;
}

.facc-hero-value .unit {
    font-size: 22px;
    font-weight: 600;
    color: #7a756d;
    margin-left: 6px;
}

.facc-hero-label {
    font-size: 14px;
    font-weight: 600;
    color: #5f5a56;
}

.facc-hero-summary {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #4d4742;
}

.facc-formula-box {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(212, 175, 55, 0.18);
    color: #2d2a26;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.facc-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.facc-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(255, 255, 255, 0.72);
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
}

.facc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.facc-kpi-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.facc-kpi-label {
    font-size: 13px;
    color: #7a756d;
}

.facc-kpi-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #2d2a26;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.facc-prime-list {
    display: grid;
    gap: 10px;
}

.facc-prime-card,
.facc-prime-empty {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #ece7dc;
    background: #faf9f7;
}

.facc-prime-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.facc-prime-power {
    font-size: 22px;
    font-weight: 700;
    color: #2d2a26;
    letter-spacing: -0.02em;
}

.facc-prime-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
    font-size: 12px;
    font-weight: 700;
}

.facc-prime-bar-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #ece7dc;
}

.facc-prime-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #d4af37 0%, #c08a14 100%);
}

.facc-prime-meta,
.facc-prime-foot,
.facc-prime-empty {
    font-size: 13px;
    line-height: 1.6;
    color: #5f5a56;
}

.facc-factor-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.facc-factor-chip,
.facc-factor-chip.is-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid #e8e4dc;
    background: #fff;
    color: #2d2a26;
    font-size: 13px;
    font-weight: 600;
}

.facc-factor-chip.is-placeholder {
    color: #7a756d;
    background: #faf9f7;
}

.facc-factor-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #7a756d;
}

.facc-table-wrap {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.facc-pair-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 340px;
}

.facc-pair-table th,
.facc-pair-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #ece7dc;
    text-align: left;
    font-size: 13px;
    color: #2d2a26;
}

.facc-pair-table th {
    font-size: 12px;
    font-weight: 700;
    color: #7a756d;
    letter-spacing: 0.02em;
    background: #faf9f7;
    position: sticky;
    top: 0;
}

.facc-pair-table td:last-child,
.facc-pair-table th:last-child {
    text-align: right;
}

.facc-disclaimer {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid #ece7dc;
    border-radius: 12px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    #faccCalculator .tool-layout-input {
        max-width: 100%;
        overflow: hidden;
    }

    .facc-amount-input:not([type="radio"]):not([type="checkbox"]) {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .facc-preset-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .facc-kpi-grid {
        grid-template-columns: 1fr;
    }

    .facc-prime-head {
        align-items: flex-start;
    }

    .facc-copy-btn {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 480px) {
    .tool-section,
    .tool-layout-split,
    .tool-layout-input,
    .tool-layout-result {
        max-width: 100%;
        overflow-x: hidden;
    }

    .facc-amount-row {
        grid-template-columns: 1fr;
    }

    .facc-preset-list {
        grid-template-columns: 1fr;
    }

    .facc-factor-chip-list {
        max-height: 180px;
    }

    .facc-kpi-value {
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .facc-section,
    .facc-amount-input,
    .facc-preset-btn,
    .facc-copy-btn,
    .facc-result-hero {
        transition: none !important;
    }

    .facc-section:hover,
    .facc-copy-btn:hover {
        transform: none !important;
    }
}
