/* ==================================================
   ClientScore Add Client Score
================================================== */

/* ------------------------------
   Form wrapper + cards
------------------------------ */

.cs-add-client-score-form {
    max-width: 860px;
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.cs-add-client-score-form,
.cs-add-client-score-form * {
    box-sizing: border-box;
}

.cs-add-client-score-form .cs-form-section {
    margin-bottom: 28px;
}

.cs-add-client-score-form .cs-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.cs-section-divider {
    display: none;
}

/* ------------------------------
   Section headings + intro text
------------------------------ */

.cs-form-section-title {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.cs-form-section-title span {
    color: #0b74ff;
}

.cs-section-intro {
    margin: 0 0 24px;
    color: #52627a;
    font-size: 16px;
    line-height: 1.55;
}

/* ------------------------------
   Standard form fields
------------------------------ */

.cs-add-client-score-form .cs-form-field {
    margin-bottom: 18px;
}

.cs-add-client-score-form label {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}

.cs-add-client-score-form input,
.cs-add-client-score-form select {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 15px;
}

.cs-add-client-score-form input::placeholder {
    color: #9aa4b2;
}

.cs-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
}

/* ------------------------------
   Validation + suburb suggestions
------------------------------ */

.cs-client-location-field {
    position: relative;
}

#cs-client-location-suggestions {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    right: 0;
    z-index: 999;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.cs-client-location-field .clientscore-suburb-suggestion {
    padding: 12px 14px;
    color: #0f172a;
    font-size: 14px;
    cursor: pointer;
}

.cs-client-location-field .clientscore-suburb-suggestion:hover {
    background: #f8fbff;
    color: #2d7ff9;
}

.cs-field-error {
    margin-top: 8px;
    color: #dc2626;
    font-size: 13px;
    line-height: 1.4;
}

.cs-input-error {
    border-color: #dc2626 !important;
}

/* ------------------------------
   Rating fields
------------------------------ */

.cs-rating-grid {
    display: grid;
    gap: 14px;
}

.cs-rating-card {
    margin-bottom: 0;
}

.cs-rating-card-buttons,
.cs-rating-card-options {
    display: grid;
    grid-template-columns: 230px 1fr;
    align-items: center;
    gap: 20px;
}

.cs-rating-card-buttons > label,
.cs-rating-card-options > label {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.cs-rating-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-rating-label i {
    width: 18px;
    flex-shrink: 0;
    color: #2d7ff9;
    text-align: center;
    margin-right: 10px;;
}

.cs-rating-buttons,
.cs-option-buttons {
    display: grid;
    gap: 10px;
    width: 100%;
}

.cs-rating-buttons {
    grid-template-columns: repeat(5, 1fr);
}

.cs-option-buttons {
    grid-template-columns: repeat(3, 1fr);
}

.cs-rating-button,
.cs-option-button {
    margin: 0 !important;
}

.cs-rating-button input,
.cs-option-button input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cs-rating-button span,
.cs-option-button span {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #ffffff;
    color: #52627a;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs-rating-button:hover span,
.cs-option-button:hover span {
    border-color: #2d7ff9;
    background: #eff6ff;
    color: #2d7ff9;
}

.cs-rating-button input:checked + span,
.cs-option-button input:checked + span {
    border-color: #2d7ff9;
    background: #2d7ff9;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(45, 127, 249, 0.25);
}

.cs-rating-scale-labels {
    display: flex;
    justify-content: space-between;
    max-width: 250px;
    margin: 0 0 -4px 250px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.cs-rating-guide {
    margin: -8px 0 18px;
    color: #64748b;
    font-size: 13px;
}

.cs-rating-divider {
    grid-column: 1 / -1;
    height: 1px;
    margin: 8px 0 2px;
    background: #e5e7eb;
}

/* ------------------------------
   Confirmation + buttons
------------------------------ */

.cs-confirmation {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0 24px;
    font-weight: 400 !important;
    line-height: 1.5;
}

.cs-confirmation input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
}

.cs-confirmation span {
    color: #0f172a;
    font-size: 15px;
    font-weight: 400;
}

.cs-form-actions {
    margin-top: 18px;
}

.cs-btn-primary {
    min-height: 50px;
    padding: 0 26px;
    border: 0;
    border-radius: 10px;
    background: #2d7ff9;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.cs-btn-primary:hover {
    background: #1e5bd6;
}

/* ------------------------------
   Notices + existing client banner
------------------------------ */

.cs-success-notice {
    margin-bottom: 24px;
    padding: 16px 18px;
    background: #ecfdf3;
    border: 1px solid #b7ebc6;
    border-radius: 12px;
    color: #166534;
    font-size: 15px;
    line-height: 1.5;
}

.cs-success-notice strong {
    display: block;
    margin-bottom: 4px;
}

.cs-existing-client-banner {
    margin-bottom: 28px;
    padding: 16px 18px;
    background: #f8fbff;
    border: 1px solid #dbe7f7;
    border-radius: 12px;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.5;
}

.cs-existing-client-banner strong {
    color: #64748b;
    font-size: 14px;
}

/* ------------------------------
   Overall score box
------------------------------ */

.cs-overall-score-box {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding: 18px;
    border-radius: 14px;
    background: #f0f7ff;
}

.cs-overall-score-header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.cs-overall-score-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #dbeafe;
    color: #2d7ff9;
}

.cs-overall-score-copy {
    flex: 1;
}

.cs-overall-score-copy strong,
.cs-overall-score-copy span {
    display: block;
}

.cs-overall-score-copy span {
    color: #52627a;
    font-size: 14px;
}

.cs-overall-score-value {
    min-width: 110px;
    margin-left: auto;
    color: #0b74ff;
    font-size: 30px;
    font-weight: 800;
    text-align: right;
}

.cs-overall-score-value small {
    color: #0f172a;
    font-size: 16px;
    font-weight: 600;
}

/* ------------------------------
   Success card after submission
------------------------------ */

body.cs-score-submitted .cs-page-title,
body.cs-score-submitted .cs-page-intro {
    display: none !important;
}

.cs-success-card {
    max-width: 760px;
    margin-bottom: 28px;
    padding: 40px;
    background: #f8fbff;
    border: 1px solid #dbeafe;
    border-radius: 18px;
}

.cs-success-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    max-width: 660px;
    margin: 0 auto 28px;
}

.cs-success-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 999px;
    background: #dbeafe;
    color: #2d7ff9;
    font-size: 28px;
}

.cs-success-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
    text-align: left;
}

.cs-success-content {
    max-width: 660px;
    margin: 0 auto;
    text-align: left;
}

.cs-success-content p {
    margin: 0 0 18px;
    color: #52627a;
    line-height: 1.7;
    text-align: left;
}

.cs-success-secondary {
    margin-top: 12px !important;
}

.cs-success-actions {
    display: flex;
    justify-content: flex-start !important;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.cs-success-actions a {
    min-height: 48px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
}

.cs-success-actions .cs-btn-primary {
    background: #2d7ff9;
    color: #ffffff !important;
}

.cs-success-actions .cs-btn-secondary {
    background: #ffffff;
    border: 1px solid #dbeafe;
    color: #2d7ff9 !important;
}

.cs-success-link {
    margin-top: 20px;
}

.cs-success-link a {
    color: #2d7ff9;
    font-weight: 600;
}

/* ------------------------------
   Mobile bottom nav fixes
------------------------------ */

@media (max-width: 767px) {
    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    nav.cs-mobile-tabs {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9999 !important;
        width: 100vw !important;
        height: 72px !important;
        min-height: 72px !important;
        overflow: visible !important;
        background: #ffffff !important;
        border-top: 1px solid #e5e7eb !important;
        box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08) !important;
    }

    nav.cs-mobile-tabs .cs-mobile-menu {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        width: 100% !important;
        height: 72px !important;
        min-height: 72px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        background: #ffffff !important;
    }

    nav.cs-mobile-tabs .cs-mobile-menu li {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 72px !important;
    }
}

/* ------------------------------
   Mobile layout
------------------------------ */

@media (max-width: 767px) {
    .cs-add-client-score-form {
        max-width: 100%;
        /*margin-top: 28px;*/
    }

    .cs-add-client-score-form,
    .cs-add-client-score-form .cs-card,
    .cs-rating-grid,
    .cs-rating-buttons,
    .cs-option-buttons {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .cs-add-client-score-form .cs-card {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .cs-add-client-score-form .cs-form-section {
        margin-bottom: 18px;
    }

    .cs-form-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .cs-section-intro {
        margin-bottom: 20px;
        font-size: 15px;
    }

    .cs-btn-primary {
        width: 100%;
    }

    .cs-section-client-details,
    .cs-section-client-details .cs-form-grid,
    .cs-client-location-field {
        overflow: visible !important;
    }

    .cs-client-location-field {
        position: relative;
        z-index: 50;
    }

    #cs-client-location-suggestions {
        top: calc(100% + 6px);
        z-index: 9999;
        max-height: 240px;
        overflow-y: auto;
    }

    .cs-section-ratings {
        position: relative;
        z-index: 1;
    }

    .cs-rating-grid {
        gap: 8px;
    }

    .cs-rating-card {
        margin-bottom: 16px;
    }

    .cs-rating-card label {
        margin-bottom: 8px;
    }

    .cs-rating-card-buttons,
    .cs-rating-card-options {
        display: block;
        margin-bottom: 18px;
    }

    .cs-rating-card-buttons > label,
    .cs-rating-card-options > label {
        display: block;
        margin-bottom: 10px;
    }

    .cs-rating-buttons {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .cs-option-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .cs-rating-button span,
    .cs-option-button span {
        height: 46px;
        padding: 0;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 600;
    }

    .cs-rating-scale-labels,
    .cs-rating-guide {
        max-width: 100%;
        margin: 0 0 16px;
        font-size: 12px;
    }

    .cs-rating-divider {
        margin: 18px 0;
    }

    .cs-overall-score-box {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 20px;
        text-align: center;
    }

    .cs-overall-score-header {
        width: 100%;
        gap: 12px;
    }

    .cs-overall-score-copy {
        flex: none;
        text-align: left;
    }

    .cs-overall-score-copy strong {
        font-size: 18px;
    }

    .cs-overall-score-value {
        min-width: 82px;
        margin-left: 0;
        font-size: 48px;
        line-height: 1;
        text-align: center;
    }

    .cs-overall-score-value small {
        font-size: 20px;
    }

    #cs-overall-score {
        display: inline-block;
        min-width: 42px;
        text-align: right;
    }

    .cs-success-card {
        margin: 0 18px 24px;
        padding: 28px 22px;
    }

    .cs-success-header {
        gap: 14px !important;
        max-width: none;
        margin: 0 0 20px;
    }

    .cs-success-icon {
        width: 52px;
        height: 52px;
        min-width: 52px;
        font-size: 22px;
    }

    .cs-success-header h3 {
        font-size: 30px;
        line-height: 1.15;
    }

    .cs-success-content {
        max-width: none;
        margin: 0;
    }

    .cs-success-content,
    .cs-success-content p,
    .cs-success-secondary {
        text-align: left;
    }

    .cs-success-content p,
    .cs-success-secondary {
        font-size: 16px;
        line-height: 1.6;
    }

    .cs-success-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-top: 20px;
    }

    .cs-success-actions a {
        width: 100%;
        min-height: 56px;
        text-align: center;
    }

    .cs-success-link {
        text-align: center;
    }
}

.cs-edit-client-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.cs-edit-client-avatar {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: #eff6ff;
    border: 2px solid #dbeafe;
    color: #2d7ff9;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.cs-edit-client-info h2 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.cs-edit-client-info p {
    margin: 0;
    color: #52627a;
    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .cs-edit-client-summary {
        align-items: flex-start;
    }

    .cs-edit-client-avatar {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }

    .cs-edit-client-info h2 {
        font-size: 24px;
    }
}

.cs-client-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 10px;

    color: #475569;
    font-size: 16px;
}


.cs-edit-client-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-edit-client-summary {
    display: flex;
    align-items: flex-start;
    gap: 22px;
}

.cs-edit-client-content h2 {
    margin: 0 0 18px;
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.cs-edit-client-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-edit-client-summary {
    display: flex;
    flex-direction: column;
}

.cs-edit-client-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.cs-edit-client-header h2 {
    margin: 0;
}

.cs-edit-client-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-edit-client-header {
    display: flex;
    align-items: center;
    gap: 20px;

    margin-bottom: 0px; /* was probably 20px+ */
}

.cs-edit-client-header h2 {
    margin: 0;

    font-size: 30px;   /* currently looks around 32-36px */
    font-weight: 700;
    line-height: 1.2;
}

.cs-edit-client-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;          /* reduce from 12px */
}


.cs-existing-client-summary {
    display: flex;
    flex-direction: column;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.cs-existing-client-summary .cs-edit-client-header {
    margin-bottom: 18px;
}

.cs-existing-client-summary .cs-edit-client-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

