/**
 * Confidence Interval Calculator Styles
 * French confidence interval tool styling for ToolZipper.
 *
 * @package Zipper
 */

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

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

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

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

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

#cintCalculator .tool-layout-input,
#cintCalculator .tool-layout-result,
.cint-support-grid,
.cint-table-wrap,
.cint-summary-table,
.cint-band-wrap {
    min-width: 0;
}

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

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

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

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

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

.cint-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;
}

.cint-mode-tabs,
.cint-preset-list,
.cint-kpi-grid,
.cint-support-grid,
.cint-band-metrics,
.cint-input-grid,
.cint-settings-grid {
    display: grid;
    gap: 10px;
}

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

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

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

.cint-mode-btn.is-active,
.cint-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);
}

.cint-mode-note,
.cint-input-hint,
.cint-note-text,
.cint-band-note,
.cint-lead {
    margin: 0;
}

.cint-mode-note,
.cint-input-hint,
.cint-note-text,
.cint-band-note {
    font-size: 12px;
    line-height: 1.6;
    color: #7a756d;
}

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

#cintMeanFields,
#cintPropFields {
    grid-template-columns: 1fr;
}

.cint-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

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

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

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

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

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

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

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

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

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

.cint-preset-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

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

.cint-waiting {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 16px;
    border: 1px solid #f1d6bf;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff8ef 0%, #fffdfa 100%);
    color: #8a6500;
}

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

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

.cint-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

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

.cint-status-badge.is-ready {
    background: rgba(70, 180, 80, 0.12);
    color: #2f7c37;
}

.cint-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cint-copy-btn:hover,
.cint-copy-btn:focus {
    outline: none;
    border-color: #d4af37;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(212, 175, 55, 0.16);
}

.cint-hero-value {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.1;
    color: #1f1b17;
    letter-spacing: -0.03em;
}

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

.cint-hero-summary {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #4f4a45;
}

.cint-formula-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 13px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    color: #6f602c;
    font-size: 13px;
    line-height: 1.6;
}

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

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

.cint-kpi-label,
.cint-band-label {
    font-size: 12px;
    font-weight: 700;
    color: #7a756d;
}

.cint-kpi-value,
.cint-band-value {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    color: #2d2a26;
}

.cint-band-wrap {
    display: grid;
    gap: 10px;
}

.cint-band-track {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f1ede6 0%, #f8f4ea 100%);
    overflow: hidden;
}

.cint-band-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.cint-band-marker {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px rgba(45, 42, 38, 0.08), 0 4px 10px rgba(45, 42, 38, 0.08);
}

.cint-band-marker.is-lower,
.cint-band-marker.is-upper {
    background: #fff;
}

.cint-band-marker.is-center {
    width: 16px;
    height: 16px;
    background: #d4af37;
}

.cint-band-scale {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #7a756d;
    font-size: 12px;
    font-weight: 600;
}

.cint-band-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.cint-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.cint-summary-table th,
.cint-summary-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eee7da;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
    line-height: 1.55;
}

.cint-summary-table th {
    width: 38%;
    color: #7a756d;
    font-weight: 700;
}

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

.cint-summary-table tr:last-child th,
.cint-summary-table tr:last-child td {
    border-bottom: 0;
}

.cint-note-card {
    background: linear-gradient(180deg, #fffefb 0%, #faf9f7 100%);
}

.cint-note-title::before {
    content: '•';
    margin-right: 2px;
}

.cint-disclaimer {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 14px 16px;
    border: 1px solid #efe6d7;
    border-radius: 12px;
    background: #fffdf9;
    color: #6f685f;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 1080px) {
    #cintCalculator .tool-layout-split,
    .cint-support-grid {
        grid-template-columns: 1fr;
    }

    #cintCalculator .tool-layout-input {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .cint-amount-input:not([type="radio"]):not([type="checkbox"]),
    .cint-select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .cint-input-grid,
    .cint-settings-grid,
    .cint-kpi-grid,
    .cint-band-metrics,
    .cint-preset-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cint-section,
    .cint-result-hero {
        padding: 16px;
    }

    .cint-hero-value {
        font-size: 28px;
    }

    .cint-kpi-value,
    .cint-band-value {
        font-size: 17px;
    }
}

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

    .cint-hero-top {
        align-items: flex-start;
    }

    .cint-hero-value {
        font-size: 25px;
    }
}
