/*
 * SBS Carbon Policy Tracker v1.0 — Stylesheet
 * Brand colours: Leaf Green #8ABE23 | Forest Green #42722D | Navy #1C395F | Blue #35558B
 */

/* ============================================================
   CONTAINER
   ============================================================ */
.sbs-carbon-tracker-wrap,
#sbs-carbon-tracker {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    color: #333;
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    overflow: hidden;
}

/* ============================================================
   LOADING / ERROR
   ============================================================ */
.sct-loading,
.sct-error {
    padding: 48px 32px;
    text-align: center;
    color: #666;
    font-size: 15px;
}

.sct-error a { color: #42722D; }

.sct-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid #e0e0e0;
    border-top-color: #8ABE23;
    border-radius: 50%;
    animation: sct-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes sct-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.sct-progress {
    background: #f5f7f5;
    padding: 16px 28px 12px;
    border-bottom: 1px solid #e8ede8;
    display: flex;
    align-items: center;
    gap: 16px;
}

.sct-progress-track {
    flex: 1;
    height: 8px;
    background: #e0e8e0;
    border-radius: 4px;
    overflow: hidden;
}

.sct-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8ABE23, #42722D);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.sct-progress-label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    min-width: 72px;
    text-align: right;
}

/* ============================================================
   STEP CONTAINER
   ============================================================ */
.sct-step-container {
    padding: 32px 36px 28px;
}

.sct-step-inner {
    max-width: 100%;
}

/* ============================================================
   QUESTIONS
   ============================================================ */
.sct-question {
    margin-bottom: 28px;
}

.sct-question-label {
    font-size: 15px;
    font-weight: 700;
    color: #1C395F;
    margin-bottom: 12px;
    line-height: 1.4;
}

.sct-optional {
    font-weight: 400;
    color: #999;
    font-size: 13px;
}

.sct-multi-hint {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* ============================================================
   OPTION BUTTONS
   ============================================================ */
.sct-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sct-option {
    background: #fff;
    border: 2px solid #d4dde8;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    text-align: left;
    line-height: 1.4;
}

.sct-option:hover {
    border-color: #8ABE23;
    background: #f6fbee;
    color: #1C395F;
}

.sct-option.sct-selected {
    border-color: #42722D;
    background: #edf5e3;
    color: #1C395F;
    font-weight: 600;
}

/* Full-width options for longer labels */
.sct-single .sct-option {
    min-width: 160px;
}

.sct-multi .sct-option {
    min-width: 140px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.sct-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef0ee;
}

.sct-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s, opacity 0.15s;
    line-height: 1;
}

.sct-btn-next,
.sct-btn-submit {
    background: #8ABE23;
    color: #fff;
}

.sct-btn-next:hover,
.sct-btn-submit:hover {
    background: #76a11b;
}

.sct-btn-back {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
    padding: 10px 20px;
}

.sct-btn-back:hover {
    border-color: #aaa;
    color: #333;
}

.sct-btn-cta {
    background: #1C395F;
    color: #fff !important;
    margin-top: 12px;
}

.sct-btn-cta:hover {
    background: #152b47;
}

.sct-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sct-validation-msg {
    margin-top: 12px;
    font-size: 13px;
    color: #E74C3C;
    min-height: 18px;
}

/* ============================================================
   RESULTS WRAP
   ============================================================ */
.sct-results-wrap {
    padding-bottom: 8px;
}

.sct-results-header {
    background: linear-gradient(135deg, #42722D, #1C395F);
    padding: 32px 36px 28px;
    color: #fff;
}

.sct-results-title {
    font-size: 22px;
    margin: 0 0 10px;
    color: #fff;
}

.sct-results-summary {
    font-size: 15px;
    color: #c8e6d0;
    margin: 0 0 16px;
    line-height: 1.6;
}

.sct-results-summary strong {
    color: #fff;
}

.sct-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sct-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sct-badge-mandatory { background: #E74C3C; color: #fff; }
.sct-badge-emerging  { background: #F39C12; color: #fff; }
.sct-badge-voluntary { background: #35558B; color: #fff; }

/* ============================================================
   UNLOCK PROMPT
   ============================================================ */
.sct-unlock-prompt {
    background: #fff9e6;
    border-top: 1px solid #f0d980;
    border-bottom: 1px solid #f0d980;
    padding: 12px 36px;
    font-size: 13px;
    color: #7a6000;
}

.sct-unlock-prompt p { margin: 0; }

/* ============================================================
   RESULTS BODY (blurred until email submitted)
   ============================================================ */
.sct-results-body {
    padding: 28px 36px;
}

.sct-results-body.sct-blurred {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
    opacity: 0.7;
    transition: filter 0.4s ease, opacity 0.4s ease;
}

.sct-no-results {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    background: #f5f7f5;
    padding: 20px 24px;
    border-radius: 6px;
    border-left: 4px solid #8ABE23;
    margin: 0;
}

/* ============================================================
   POLICY CARDS
   ============================================================ */
.sct-policy-card {
    background: #fff;
    border: 1px solid #e4e9e4;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.sct-policy-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.sct-policy-mandatory { border-left: 5px solid #E74C3C; }
.sct-policy-emerging  { border-left: 5px solid #F39C12; }
.sct-policy-voluntary { border-left: 5px solid #35558B; }

.sct-policy-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.sct-policy-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-top: 2px;
}

.sct-policy-title {
    font-size: 15px;
    font-weight: 700;
    color: #1C395F;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.sct-policy-body {
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.7;
    color: #444;
}

.sct-policy-when {
    margin: 0 0 12px;
}

.sct-policy-phase {
    margin: 0 0 12px;
    color: #E74C3C;
    font-size: 13px;
}

.sct-must-do {
    margin-bottom: 12px;
}

.sct-must-do ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.sct-must-do li {
    margin-bottom: 6px;
}

.sct-coming-soon {
    font-size: 12px;
    color: #777;
    font-style: italic;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 8px 0 0;
}

.sct-services {
    margin: 10px 0 0;
    font-size: 12px;
    color: #555;
}

.sct-policy-footer {
    padding: 12px 20px;
    background: #f9fbf7;
    border-top: 1px solid #eef0ee;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sct-policy-cta {
    display: inline-block;
    background: #8ABE23;
    color: #fff !important;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.15s;
}

.sct-policy-cta:hover {
    background: #76a11b;
}

.sct-source-link {
    font-size: 12px;
    color: #35558B;
    text-decoration: none;
}

.sct-source-link:hover {
    text-decoration: underline;
}

/* ============================================================
   CAPTURE PANEL (contact form)
   ============================================================ */
.sct-capture-panel {
    padding: 32px 36px;
    background: #f5f7fb;
    border-top: 2px solid #d4dde8;
}

.sct-capture-inner h3 {
    font-size: 18px;
    color: #1C395F;
    margin: 0 0 8px;
}

.sct-capture-inner > p {
    font-size: 14px;
    color: #555;
    margin: 0 0 20px;
    line-height: 1.6;
}

.sct-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.sct-form-row .sct-input {
    flex: 1;
}

.sct-input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #c8d4e0;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
    margin-bottom: 12px;
}

.sct-input:focus {
    outline: none;
    border-color: #8ABE23;
}

.sct-input-full {
    width: 100%;
}

.sct-optin-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.sct-optin-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #8ABE23;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.sct-form-error {
    font-size: 13px;
    color: #E74C3C;
    margin-bottom: 12px;
    min-height: 18px;
}

.sct-btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.sct-privacy-note {
    font-size: 12px;
    color: #999;
    margin: 0;
    text-align: center;
}

.sct-privacy-note a {
    color: #42722D;
}

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.sct-success {
    text-align: center;
    padding: 16px 0 8px;
}

.sct-success-icon {
    width: 54px;
    height: 54px;
    background: #8ABE23;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
}

.sct-success h3 {
    font-size: 18px;
    color: #1C395F;
    margin: 0 0 10px;
}

.sct-success p {
    font-size: 14px;
    color: #555;
    margin: 0 0 20px;
    line-height: 1.6;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .sct-step-container,
    .sct-results-body,
    .sct-capture-panel {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sct-results-header {
        padding: 24px 20px 20px;
    }

    .sct-unlock-prompt {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sct-progress {
        padding: 14px 20px 10px;
    }

    .sct-form-row {
        flex-direction: column;
        gap: 0;
    }

    .sct-options {
        flex-direction: column;
    }

    .sct-option {
        width: 100%;
    }

    .sct-nav {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .sct-btn-next {
        width: 100%;
        text-align: center;
    }

    .sct-btn-back {
        width: 100%;
        text-align: center;
    }

    .sct-policy-header {
        flex-direction: column;
        gap: 8px;
    }

    .sct-results-title {
        font-size: 18px;
    }
}
