﻿/* =============================
   SURVEY – CUSTOMER PORTAL THEME
   ============================= */

/* Use the portal font stack */

html,
body {
    background-color: #0061a8;
    margin: 0;
}

body.survey-body {
    background: #f3f5fb;
    font-family: 'AkkoProRegular', 'CalibriRegular', Arial, sans-serif;
    color: #1f2937;
}

.survey-wrapper { 
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
}

/* Card */
.survey-card {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1px solid #e6e9ef;
    padding: 40px;
}

.survey-wrapper.survey-wide .survey-card {
    max-width: 1200px;
}

    /* Headings */
    .survey-card h1 {
        font-family: 'AkkoProRegular';
        font-weight: normal;
        font-size: 1.9rem;
        text-align: center;
        margin-bottom: 0.5rem;
        color: #0b1c33;
    }

    .survey-card .survey-subtitle {
        text-align: center;
        font-family: 'AkkoProLight';
        font-size: 1rem;
        color: #556171;
        margin-bottom: 2rem;
    }

/* Question text */
.question-text,
.question-block label.form-label {
    font-family: 'AkkoProRegular';
    font-size: 1rem;
    font-weight: normal;
    color: #1d2939;
    margin-bottom: 0.5rem; /* more space above controls */
}


.question-block {
    margin-bottom: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

    .question-block + .question-block {
        border-top: 1px solid #e8ecf2;
        padding-top: 1.4rem;
    }

.question-optional {
    font-family: 'AkkoProRegular';
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 0.35rem;
}

.question-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.question-row .question-text {
    flex: 1 1 260px;
}

.question-row .question-input {
    flex: 0 0 auto;
}

/* Score button grid */
.score-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.1rem;
}

@media (max-width: 576px) {
    .score-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .overall-score-btn,
    .question-score-btn {
        width: 100%;
    }

    .question-row {
        align-items: stretch;
    }
}



/* Score button style */
.overall-score-btn,
.question-score-btn {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 10px;
    font-family: 'AkkoProRegular';
    font-size: 0.95rem;
    border: 1px solid #52c3eb;
    background: #ffffff;
    color: #0061a8;
    transition: 0.15s ease;
    /* NEW: centre the number inside the square */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}


.btn-check:focus-visible + .overall-score-btn,
.btn-check:focus-visible + .question-score-btn,
.btn-check:focus-visible + .yn-btn,
.overall-score-btn:focus-visible,
.question-score-btn:focus-visible,
.yn-btn:focus-visible,
.btn-submit:focus-visible,
.survey-brand-bar a:focus-visible,
.survey-privacy-note a:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 3px;
}

    /* Hover */
    .overall-score-btn:hover,
    .question-score-btn:hover {
        background: #e7f6fd;
        border-color: #0061a8;
    }

/* Selected */
.btn-check:checked + .overall-score-btn,
.btn-check:checked + .question-score-btn,
.btn-primary.overall-score-btn,
.btn-primary.question-score-btn {
    background: #0061a8 !important;
    border-color: #0061a8 !important;
    color: white !important;
    box-shadow: none !important;
}

/* Yes/No Toggle */
.yn-group {
    display: inline-flex;
    background: #f1f4f7;
    border-radius: 999px;
    padding: 3px;
    border: 1px solid #d7dce2;
    margin-top: 0.3rem;
}

.yn-btn {
    font-family: 'AkkoProRegular';
    font-weight: normal;
    font-size: 0.9rem;
    min-width: 70px;
    padding: 0.35rem 1rem;
    border-radius: 999px !important;
    background: transparent;
    color: #475569;
    transition: 0.15s ease;
}

/* Selected Toggle */
.btn-check:checked + .yn-btn {
    background: #0061a8;
    color: #ffffff;
    box-shadow: none;
}

/* Hover */
.yn-btn:hover {
    background: rgba(0,97,168,0.10);
}

/* Submit button */
.survey-card .btn-submit {   
    font-family: 'AkkoProRegular';
    font-size: 1rem;
    padding: 0.55rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #0061a8, #52c3eb);
    border: none;
    color: #ffffff;
    transition: 0.2s ease;
}

    .survey-card .btn-submit:hover {
        background: linear-gradient(135deg, #00538f, #3db7e8);
    }

.survey-divider {
    border: 0;
    border-top: 1px solid #e8ecf2;
    margin: 1.5rem 0 1.25rem;
}

.survey-preselected-note {
    background: #e7f6ec;
    border: 1px solid #6fce95;
    color: #166534;
    font-family: 'AkkoProRegular';
}
.survey-actions {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end; /* pushes button to the right */
}
/* Brand bar, matching portal colours */

.survey-brand-bar {
    position: sticky;
    background-color: #0061a8; /* portal blue */
    border-bottom: 3px solid #52c3eb;
    padding: 14px 0;
}

.survey-brand-inner {
    display: flex;
    align-items: center;
    justify-content: center; /* centre logo in bar */
}

.survey-logo {
    height: 122px; /* native height */
    width: auto;
}

/* Layout for Yes/No questions */

.question-block-yesno {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Desktop: text left, toggle right */
@media (min-width: 768px) {
    .question-block-yesno {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        column-gap: 1.5rem;
    }

        .question-block-yesno .question-text {
            margin-bottom: 0;
            flex: 1 1 auto;
            margin-right: 0.5rem;
        }

        .question-block-yesno .question-input {
            flex-shrink: 0;
        }
}

/* Remove extra top margin so toggle hugs the text nicely */
.question-block-yesno .yn-group {
    margin-top: 0;
}


/* Thank-you page tweaks */

.review-block {
    margin-top: 1.75rem;
}

    /* Highlighted style for the positive-review block */
    .review-block.highlighted {
        padding: 1.75rem 1.5rem;
        border-radius: 0.75rem;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
    }

.review-title {
    font-family: 'AkkoProRegular';
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #0b1c33;
}

.review-links {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

    .review-links li + li {
        margin-top: 0.4rem;
    }

/* Brand the links a bit */

.trustpilot-btn {
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
}

.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Hover state for the main CTA */
.trustpilot-btn:hover {
    text-decoration: underline;
}

.google-link {
    color: #4285f4;
    font-weight: 600;
    text-decoration: none;
}

    .google-link:hover {
        text-decoration: underline;
    }


/* Admin + results */

.admin-template-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.template-create-form {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.template-create-form input {
    height: 52px;
}

.admin-template-card {
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    padding: 16px;
    background: #f9fbff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-question-list {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    padding: 12px;
}

.admin-create-card {
    background: #f9fbff;
}

.compact-template-input {
    max-width: 320px;
    min-width: 220px;
}

.template-toggle {
    color: #0b5ed7;
    font-weight: 600;
}

.template-toggle .toggle-icon {
    display: inline-block;
    transition: transform 0.15s ease;
}

.template-body.collapse:not(.show) {
    margin-top: -8px;
}

.admin-question-row {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) repeat(3, minmax(140px, 1fr)) 120px;
    align-items: start;
    gap: 0.9rem;
    padding: 14px;
    border: 1px solid #eef1f6;
    border-radius: 10px;
    background: #f6f9ff;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .admin-question-row {
        grid-template-columns: 1fr;
    }

    .admin-select,
    .admin-toggle,
    .admin-drag {
        width: 100%;
    }
}

.admin-select select,
.admin-question-row input[type="text"] {
    font-size: 0.95rem;
}

.admin-toggle .form-check-input {
    cursor: pointer;
}

.admin-question-row .question-text {
    min-height: 120px;
    height: 100%;
}

.admin-drag {
    color: #9aa4b5;
    font-size: 1.1rem;
    align-self: stretch;
    justify-self: end;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.results-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.results-template-card {
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    padding: 16px;
    background: #fdfefe;
}

.kpi-pill {
    border-radius: 999px;
    padding: 8px 14px;
    border: 1px solid #e6e9ef;
    background: #eef3fb;
}

.kpi-card {
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #f7f9ff 0%, #ffffff 100%);
}

.kpi-card h3 {
    font-weight: 700;
    color: #0b1c33;
}

.results-section {
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    padding: 14px 16px;
    background: #f9fbff;
}

.question-breakdown-list,
.recent-response-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-breakdown-row,
.recent-response-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #eef1f6;
}

.score-pill,
.yesno-pill {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid #d8e2f0;
    background: #eef3fb;
    color: #0b1c33;
}

.yes-pill {
    background: #e7f6ed;
    border-color: #bbe3c8;
    color: #1f7a46;
}

.no-pill {
    background: #fdeeee;
    border-color: #f5c4c4;
    color: #c53030;
}

.score-bar {
    flex: 1;
    height: 10px;
    background: #eef1f6;
    border-radius: 999px;
    overflow: hidden;
    max-width: 160px;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #1f7a46, #2fa15d);
}

.results-kpi-grid .progress {
    background-color: #e7f6ed;
}

.results-kpi-grid .progress-bar {
    background-color: #1f7a46;
}

.recent-score {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.free-text-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.free-text-question {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 10px;
    padding: 12px;
}

.free-text-total {
    background: #e7f6ed;
    border: 1px solid #bbe3c8;
    color: #1f7a46;
}

.free-text-highlight {
    border-color: #eef1f6;
    background: #fff;
}

.free-text-highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.highlight-high {
    background: #e7f6ed;
    border-color: #bbe3c8;
    color: #1f7a46;
}

.highlight-neutral {
    background: #fff4e5;
    border-color: #f7d7a3;
    color: #92400e;
}

.highlight-low {
    background: #fdeeee;
    border-color: #f5c4c4;
    color: #c53030;
}

.free-text-response-list {
    padding-left: 0;
}

.free-text-response-item + .free-text-response-item {
    border-top: 1px solid #eef1f6;
    margin-top: 10px;
    padding-top: 10px;
}

.free-text-meta {
    color: #64748b;
    font-size: 0.9rem;
}

.inbox-response-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inbox-response-card {
    padding: 14px;
}

.inbox-answer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.inbox-answer {
    border: 1px solid #eef1f6;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
}

.score-dot {
    font-size: 0.9rem;
}

/* Privacy note */
.survey-privacy-note {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    background: #f9fbff;
    color: #334155;
    font-size: 0.95rem;
}

.survey-privacy-note a {
    color: #0061a8;
    text-decoration: underline;
}

/* Policy page */
.policy-card {
    padding: 48px;
    line-height: 1.6;
}

.policy-section + .policy-section {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid #e8ecf2;
}

.policy-section h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: #0b1c33;
}

.policy-section h3 {
    font-size: 1.1rem;
    margin-top: 0.25rem;
    color: #1d2939;
}

.policy-section ul {
    padding-left: 1.2rem;
}

.policy-address {
    font-style: normal;
    margin-bottom: 0.75rem;
}

.policy-table th {
    background: #f6f8fb;
    color: #1d2939;
    font-weight: 700;
}

.policy-table td {
    vertical-align: top;
}
.survey-footer {
    padding: 1rem 0 1.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,.06);
}

    .survey-footer .container {
        max-width: 720px;
    }