/**
 * p-value Calculator Styles
 * Localized English styles for the p-value calculator
 *
 * @package Zipper
 */

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

.pvc-intro {
    display: grid;
    gap: 6px;
}

.pvc-lead {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #5f5a56;
}

#pvcCalculator .tool-layout-split {
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 16px;
}

#pvcCalculator .tool-layout-input {
    max-width: 360px;
}

#pvcCalculator .tool-layout-input,
#pvcCalculator .tool-layout-result {
    min-width: 0;
}

.pvc-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.pvc-tip-section {
    background: #fffdf8;
}

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

.pvc-section-title,
.pvc-note-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.pvc-section-title i,
.pvc-live-pill i,
.pvc-disclaimer i,
.pvc-waiting i,
.pvc-note-title::before {
    color: #d4af37;
}

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

.pvc-mode-tabs,
.pvc-tail-tabs {
    display: grid;
    gap: 8px;
}

.pvc-mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pvc-tail-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pvc-mode-btn,
.pvc-tail-btn,
.pvc-preset-btn {
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: #fff;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pvc-tail-btn {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
}

.pvc-mode-btn:hover,
.pvc-mode-btn:focus,
.pvc-tail-btn:hover,
.pvc-tail-btn:focus,
.pvc-preset-btn:hover,
.pvc-preset-btn:focus {
    outline: none;
    border-color: #d4af37;
    color: #8a6500;
    background: rgba(212, 175, 55, 0.1);
}

.pvc-mode-btn.is-active,
.pvc-tail-btn.is-active,
.pvc-preset-btn.is-active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.18);
}

.pvc-mode-note,
.pvc-input-hint,
.pvc-note-text,
.pvc-threshold-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #7a756d;
}

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

.pvc-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

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

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

.pvc-select-row {
    align-items: center;
}

.pvc-amount-input,
.pvc-select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: #fff;
    color: #2d2a26;
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pvc-amount-input:hover,
.pvc-select:hover {
    border-color: #d4c67a;
}

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

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

.pvc-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #e8e4dc;
    border-radius: 9px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

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

.pvc-btn-group {
    display: grid;
    gap: 8px;
}

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

.pvc-tip-list,
.pvc-step-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
    color: #5f5a56;
    font-size: 13px;
    line-height: 1.5;
}

.pvc-waiting {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid #f1d6bf;
    border-radius: 12px;
    background: #fff8f0;
    color: #8a5d3b;
}

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

.pvc-result-hero {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff9ec 0%, #fff3d6 100%);
    border: 1px solid rgba(212, 175, 55, 0.28);
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.14);
}

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

.pvc-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #8a6500;
    font-size: 12px;
    font-weight: 700;
}

.pvc-status-badge.is-significant {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.pvc-status-badge.is-not-significant {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.pvc-status-badge.is-example {
    background: rgba(255, 255, 255, 0.78);
    color: #8a6500;
}

.pvc-status-badge.is-borderline {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

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

.pvc-copy-btn:hover,
.pvc-copy-btn:focus {
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(212, 175, 55, 0.18);
}

.pvc-hero-value {
    font-size: clamp(28px, 4.2vw, 38px);
    line-height: 1;
    font-weight: 800;
    color: #2d2a26;
    letter-spacing: -0.03em;
}

.pvc-hero-label {
    font-size: 13px;
    font-weight: 700;
    color: #8a6500;
}

.pvc-hero-summary {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #4d463f;
}

.pvc-formula-box {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
    color: #6f5b2b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    word-break: break-word;
}

.pvc-kpi-grid,
.pvc-support-grid,
.pvc-threshold-grid {
    display: grid;
    gap: 10px;
}

.pvc-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pvc-support-grid {
    grid-template-columns: 1fr;
}

.pvc-threshold-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pvc-kpi-card,
.pvc-threshold-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #eee6d5;
    border-radius: 12px;
    background: #fff;
}

.pvc-kpi-label,
.pvc-threshold-label {
    font-size: 12px;
    font-weight: 700;
    color: #8b7e67;
}

.pvc-kpi-value,
.pvc-threshold-state {
    font-size: 16px;
    font-weight: 800;
    color: #2d2a26;
    line-height: 1.3;
    word-break: keep-all;
}

.pvc-threshold-card.is-pass {
    border-color: rgba(16, 185, 129, 0.26);
    background: #f2fcf8;
}

.pvc-threshold-card.is-pass .pvc-threshold-state {
    color: #047857;
}

.pvc-threshold-card.is-fail {
    border-color: rgba(239, 68, 68, 0.2);
    background: #fff6f6;
}

.pvc-threshold-card.is-fail .pvc-threshold-state {
    color: #b91c1c;
}

.pvc-threshold-card.is-borderline {
    border-color: rgba(245, 158, 11, 0.28);
    background: #fff9ef;
}

.pvc-threshold-card.is-borderline .pvc-threshold-state {
    color: #b45309;
}

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

.pvc-summary-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
}

.pvc-summary-table th,
.pvc-summary-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #eee6d5;
    text-align: left;
    font-size: 12px;
    line-height: 1.45;
}

.pvc-summary-table th {
    width: 120px;
    color: #7a6f60;
    font-weight: 700;
    background: #fcfaf6;
}

.pvc-summary-table td {
    color: #2d2a26;
    font-weight: 600;
}

.pvc-note-card {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid #eadfb8;
    border-radius: 12px;
    background: linear-gradient(135deg, #fffaf0 0%, #fffdf8 100%);
}

.pvc-note-title::before {
    content: '•';
    margin-right: 4px;
}

.pvc-disclaimer {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid #f1e8d0;
    border-radius: 12px;
    background: #fffcf5;
    color: #7a756d;
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 1080px) {
    .pvc-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pvc-step-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 861px) {
    .pvc-step-list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px 10px;
        padding-left: 0;
        list-style-position: inside;
    }

    .pvc-step-list li {
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid #eee6d5;
        border-radius: 12px;
        background: #fcfaf6;
    }
}

@media (max-width: 1080px) {
    .pvc-support-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    #pvcCalculator .tool-layout-split {
        grid-template-columns: 1fr;
    }

    #pvcCalculator .tool-layout-input {
        max-width: none;
    }
}

@media (max-width: 680px) {
    .pvc-input-grid,
    .pvc-threshold-grid,
    .pvc-preset-list,
    .pvc-mode-tabs,
    .pvc-tail-tabs {
        grid-template-columns: 1fr;
    }

    .pvc-section,
    .pvc-result-hero,
    .pvc-kpi-card,
    .pvc-threshold-card {
        padding: 12px;
    }

    .pvc-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pvc-summary-table th,
    .pvc-summary-table td {
        padding: 9px 10px;
        font-size: 12px;
    }

    .pvc-summary-table th {
        width: 108px;
    }
}
