/* ClearPay Claims — brand stylesheet
   Matches the look and feel of ClearPay.Claims.CommonWealth.
   Bootstrap 5 provides structure; these overrides apply the ClearPay brand on top.
   ------------------------------------------------------------------ */

/* Inactivity dialog action buttons — no border, no focus ring */
#inactivityModal .cp-dialog-action,
#inactivityModal .cp-dialog-action:focus,
#inactivityModal .cp-dialog-action:active {
    outline: none;
    box-shadow: none;
    border: none;
}

:root {
    --cp-purple:  #814C9E;
    --cp-bg:      #f7f7f7;
    --cp-nav-top: #9a9a9a;
    --cp-nav-bot: #000000;
    --cp-text:    #1f1f1f;
    --cp-error:   #de3226;
    --cp-nav-h:   50px;
}

/* ---- Global ---- */
html, body {
    background-color: var(--cp-bg);
    color: var(--cp-text);
    font-size: 15px;
}

body {
    padding-top: var(--cp-nav-h);   /* offset for fixed navbar */
}

/* ---- Fixed top navbar — black gradient ---- */
.cp-navbar {
    background: linear-gradient(to bottom, var(--cp-nav-top), var(--cp-nav-bot));
    min-height: var(--cp-nav-h);
    border: none;
    border-radius: 0;
    padding: 0;
    flex-wrap: wrap;       /* lets the collapse row appear below the header row */
}

/* Header row: back | title | hamburger — always 50px tall */
.cp-navbar-row {
    display: flex;
    align-items: center;
    width: 100%;
    height: var(--cp-nav-h);
    flex-shrink: 0;
}

/* Left slot — back chevron */
.cp-nav-left {
    align-self: stretch;
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

/* Plain link chevron, matching original fa-chevron-left <a> */
.cp-back-link {
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 100%;
}
.cp-back-link svg {
    width: 20px;
    height: 36px;
    flex-shrink: 0;
}
.cp-back-link:hover { opacity: 1; }

/* Centre slot — title + step, absolutely centred in the bar */
.cp-nav-centre {
    flex: 1;
    text-align: center;
    pointer-events: none;
}
.cp-nav-title {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cp-nav-step {
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    line-height: 1;
}

/* Right slot — hamburger */
.cp-nav-right {
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    flex-shrink: 0;
}

.cp-hamburger {
    background: none;
    border: none;
    padding: 4px;
    color: #fff;
    line-height: 1;
}
.cp-hamburger:focus { outline: none; box-shadow: none; }

/* Collapse menu — drops DOWN from the header row, spans full width */
.cp-navbar .navbar-collapse {
    width: 100%;
    background: rgba(0,0,0,0.92);
}
.cp-nav-menu {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
.cp-nav-menu-link {
    display: block;
    width: 100%;
    color: #fff !important;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    font-size: 1rem;
    text-align: right;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    border-radius: 0;
}
.cp-nav-menu-link:hover { background: rgba(255,255,255,0.08); color: #fff !important; }
.btn-logout-nav { cursor: pointer; }

/* ---- Buttons — purple, uppercase, square corners ---- */
.btn-primary, .btn-cp {
    background-color: var(--cp-purple) !important;
    border-color:     var(--cp-purple) !important;
    color: #f0f0f0 !important;
    text-transform: uppercase;
    border-radius: 0;
    font-size: 1em;
    padding: 0.6875em 1em;
    letter-spacing: 0.02em;
}
.btn-primary:hover, .btn-cp:hover,
.btn-primary:active, .btn-cp:active {
    background-color: #6a3d84 !important;
    border-color:     #6a3d84 !important;
    opacity: 0.9;
}
.btn-primary:disabled, .btn-cp:disabled {
    background-color: #dedede !important;
    border-color:     #dedede !important;
    color: #888 !important;
}

/* Outline-secondary stays neutral */
.btn-outline-secondary {
    border-radius: 0;
    text-transform: uppercase;
}
.btn-outline-danger {
    border-radius: 0;
}

/* ---- Form controls ---- */
.form-control, .form-select {
    border-radius: 0;
    border-color: #787878;
    background-color: #fff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--cp-purple);
    box-shadow: 0 0 0 0.15rem rgba(129,76,158,0.25);
}

/* Minimum touch target */
.form-control-lg, .form-select-lg, .btn-lg {
    min-height: 44px;
}

/* Underline-only inputs (login page, matching original Mobiscroll style) */
.cp-input-underline {
    border: none !important;
    border-bottom: 1px solid #787878 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-shadow: none !important;
}
.cp-input-underline:focus {
    border-bottom-color: var(--cp-purple) !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}

/* Wizard form fields — underline only, matching Mobiscroll clearpay theme */
.cp-wizard-form .form-control,
.cp-wizard-form .form-select {
    border: none;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    background-color: transparent;  /* background-color only — preserves Bootstrap's select arrow SVG */
    padding-left: 0;
    font-size: 1rem;
    min-height: 44px;
}
.cp-wizard-form .form-control:focus,
.cp-wizard-form .form-select:focus {
    border-bottom-color: var(--cp-purple);
    box-shadow: none;
    background-color: transparent;
    outline: none;
}

/* Mobile: bump font-size to 16px to prevent iOS Safari auto-zoom on focus,
   and add vertical padding so the tap area is comfortable */
@media (max-width: 767.98px) {
    .cp-wizard-form .form-control,
    .cp-wizard-form .form-select {
        font-size: 16px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
}
.cp-wizard-form .form-control[readonly] {
    color: #888;
}
/* Field label — small grey text above the underline input */
.cp-field-label {
    display: block;
    font-size: 0.78rem;
    color: #888;
    margin-bottom: 0;
    margin-top: 10px;
}
/* Spacing between fields */
.cp-field { margin-bottom: 4px; }

/* ---- Cards ---- */
.card {
    border-radius: 0;
    border-color: #ddd;
    background-color: #fff;
}
.card-header {
    border-radius: 0 !important;
    background-color: #f0f0f0;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cp-purple);
}

/* ---- Validation errors ---- */
.text-danger { color: var(--cp-error) !important; }
.field-validation-error { color: var(--cp-error); font-size: 0.85rem; display: block; }
.cp-field-error { color: var(--cp-error); font-size: 0.85rem; display: block; margin-top: 2px; }
.input-validation-error { border-color: var(--cp-error) !important; }
.validation-summary-errors ul { margin: 0; padding-left: 1.2rem; }

/* ---- Login page ---- */
.cp-login-logo {
    display: block;
    width: 60%;
    margin: 80px auto 40px;
}

/* ---- List group (drafts) ---- */
.list-group-item {
    border-radius: 0 !important;
    border-color: #ddd;
}

/* ---- Page content container ---- */
.cp-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 14px 40px;
}

/* ---- Alerts ---- */
.alert { border-radius: 0; }

/* ---- Progress / Submission ---- */
.cp-progress { background: var(--cp-purple); }

/* ---- Confirmation definition list ---- */
dt { color: #555; font-weight: 600; }
dd { margin-bottom: 0.35rem; }

/* ---- Draft list (Drafts/Submitted pages) ---- */
.cp-draft-list { margin: 0; padding: 0; }
.cp-draft-item {
    background: var(--cp-bg);
    border-bottom: 1px solid #ddd;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.cp-draft-item:first-child { border-top: 1px solid #ddd; }
.cp-draft-item:nth-child(even) { background: #e8e8e8; }
.cp-draft-info { flex: 1; font-size: 0.9rem; }
.cp-draft-date { color: #888; font-size: 0.8rem; }
.cp-draft-actions { display: flex; gap: 6px; flex-shrink: 0; }
.cp-action-continue {
    background: #5cb85c; border-color: #4cae4c; color: #fff;
    border-radius: 0; text-transform: uppercase; font-size: 0.75rem;
}
.cp-action-continue:hover { background: #449d44; border-color: #398439; color: #fff; }
.cp-action-delete {
    background: #d9534f; border-color: #d43f3a; color: #fff;
    border-radius: 0; text-transform: uppercase; font-size: 0.75rem;
}
.cp-action-delete:hover { background: #c9302c; border-color: #ac2925; color: #fff; }

/* ---- Eligibility segmented controls ---- */
.cp-segmented-group { margin-bottom: 0; }
.cp-segmented-label {
    display: block;
    font-size: 0.85rem;
    color: #555;
    padding: 12px 0 6px;
    font-weight: 500;
}
.cp-seg-btn {
    border-radius: 0 !important;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-color: var(--cp-purple) !important;
    color: var(--cp-purple) !important;
    background-color: #fff !important;
}
.cp-seg-btn:hover {
    background-color: rgba(129,76,158,0.1) !important;
}
.btn-check:checked + .cp-seg-btn {
    background-color: var(--cp-purple) !important;
    border-color: var(--cp-purple) !important;
    color: #fff !important;
}

/* ---- Inset info block ---- */
.cp-form-inset {
    padding: 0 0 12px 0;
    font-size: 1rem;
    color: #444;
}

/* ---- Nav menu icon ---- */
.cp-nav-icon { vertical-align: -2px; margin-right: 8px; }

/* ---- Mobile drum-roll select picker ---- */
.cp-picker-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1060;
    flex-direction: column;
    justify-content: flex-end;
}
.cp-picker-overlay.active { display: flex; }

.cp-picker-backdrop {
    flex: 1;
    background: rgba(0,0,0,0.4);
}

.cp-picker-sheet {
    background: #fff;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.cp-picker-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.cp-picker-btn {
    background: none;
    border: none;
    font-size: 1rem;
    padding: 6px 4px;
    color: var(--cp-purple);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.cp-picker-btn-done { font-weight: 700; }

/* The scrollable drum-roll wheel */
.cp-picker-wheel-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.cp-picker-wheel {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    /* top+bottom padding = (220px - 44px item) / 2 = 88px
       so the first and last item can scroll to the centre line */
    padding: 88px 0;
    box-sizing: border-box;
    scrollbar-width: none;
}
.cp-picker-wheel::-webkit-scrollbar { display: none; }
.cp-picker-wheel.cp-picker-no-snap  { scroll-snap-type: none; }

.cp-picker-item {
    scroll-snap-align: center;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    font-size: 1rem;
    color: #aaa;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
}
.cp-picker-item.cp-picker-selected {
    color: var(--cp-text);
    font-size: 1.05rem;
    font-weight: 500;
}

/* Hairline rules that mark the selected row */
.cp-picker-highlight {
    position: absolute;
    top: 50%;
    left: 16px;
    right: 16px;
    height: 44px;
    transform: translateY(-50%);
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    pointer-events: none;
    z-index: 1;
}

/* Fade the rows above and below the selection into white */
.cp-picker-wheel-wrap::before,
.cp-picker-wheel-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 88px;
    pointer-events: none;
    z-index: 2;
}
.cp-picker-wheel-wrap::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95), transparent);
}
.cp-picker-wheel-wrap::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(255,255,255,0.95), transparent);
}

/* ---- Date picker: three wheels side by side ---- */
.cp-date-wheels {
    display: flex;
}
/* Month names are the longest text, so give it the most space */
.cp-date-month-col { flex: 5; }
.cp-date-day-col   { flex: 2; }
.cp-date-year-col  { flex: 3; }

/* Reduce horizontal padding in the narrower columns */
.cp-date-month-col .cp-picker-item,
.cp-date-day-col   .cp-picker-item,
.cp-date-year-col  .cp-picker-item {
    padding: 0 6px;
}

/* Hairline dividers between the three columns */
.cp-date-day-col {
    border-left:  1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
}
