/* account.css - patient account pages */

/* 1. Page area and cards */

/* content area between header and footer */
.dashboard-section {
    padding: 2rem 16px 3.5rem;
    background: linear-gradient(to bottom, #DCE6F2 0, var(--page-bg) 340px);
}

/* centred white card */

.form-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-large);
}

/* more padding from 640px */
@media (min-width: 640px) {
    .form-section {
        padding: 2.5rem 2.75rem;
    }
}

/* 2. Headings, text and links */

/* card heading */

.form-section h1 {
    margin-bottom: 0.375rem;
    font-size: 1.75rem;
}

/* body text */

.form-section > p {
    color: var(--text-soft);
}

/* links inside cards */

.form-section a {
    font-weight: 600;
}

.form-section > p:last-child {
    margin: 1.5rem 0 0;
}

/* 3. Forms */

.form-section form {
    margin-top: 1.5rem;
}

/* label + input group */
.form-group {
    margin-bottom: 1.125rem;
}

/* field labels (same as the login page) */
.form-group label {
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* inputs with navy focus ring */
.form-group input:not([type="checkbox"]) {
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:not([type="checkbox"]):focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(79, 163, 224, 0.25);
}

/* show passwords checkbox row */
.form-group label:has(input[type="checkbox"]) {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
}

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    accent-color: var(--navy);
}

/* primary submit button */

.form-section button[type="submit"] {
    width: 100%;
    min-height: 50px;
    margin-top: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 0;
    border-radius: 8px;
    background: var(--navy);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    cursor: pointer;
    transition: background-color 0.2s;
}

.form-section button[type="submit"]:hover {
    background: var(--navy-dark);
}

/* textarea like the inputs */
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #CCD5DF;
    border-radius: 8px;
    font: inherit;
    resize: vertical;
}
.form-group textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(79, 163, 224, 0.25);
}

/* message form on the contact page: name and email side by side from 600px */
.contact-help .help-form {
    margin-top: 0.5rem;
}
@media (min-width: 600px) {
    .contact-help .help-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 1rem;
    }
    .contact-help .help-form > * {
        grid-column: 1 / -1;
    }
    .contact-help .help-form > .form-group:nth-of-type(1),
    .contact-help .help-form > .form-group:nth-of-type(2) {
        grid-column: auto;
    }
}
.contact-help .help-form .btn {
    justify-self: start;
    min-width: 140px;
}
.contact-help > p {
    margin: 0;
    color: var(--text-soft);
}

/* "having difficulties" box on the forgot password page */
.help-box {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #E3E8EE;
}
.help-box summary {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--navy);
    border-radius: 8px;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    list-style: none;
}
.help-box summary::-webkit-details-marker {
    display: none;
}
.help-box summary:hover,
.help-box[open] summary {
    background: #EEF4FA;
}
.help-box > p {
    margin: 1rem 0 0;
    color: var(--text-soft);
}

/* 4. Messages */

/* shared message box styles */
.success-message,
.error-message,
.development-message {
    margin: 1rem 0;
    padding: 0.875rem 1rem;
    border: 1px solid;
    border-radius: 8px;
    font-size: 0.9375rem;
}

.success-message p,
.error-message p,
.development-message p {
    margin: 0;
}
.error-message p + p,
.development-message p + p {
    margin-top: 0.25rem;
}

/* success */
.success-message {
    background: #ECFDF3;
    border-color: #ABEFC6;
    color: #067647;
}

/* error */
.error-message {
    background: #FEF3F2;
    border-color: #FECDCA;
    color: var(--error);
}

/* dev-only reset code (localhost) */
.development-message {
    background: var(--sky-light);
    border-color: #BFDFF5;
    color: var(--navy);
}

/* 5. Patient dashboard */

/* white rounded card */
.dashboard-card {
    padding: 1.5rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* status label */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-left: 3px solid var(--accent);
    border-radius: 3px;
    background: var(--accent-light);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-text);
}

/* Quick action tiles */

.dashboard-subheading {
    margin: 2rem 0 0.875rem;
    font-size: 1.125rem;
}

/* tile: icon above the label */
.action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    height: 100%;
    min-height: 130px;
    padding: 1.25rem 1rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--navy);
    text-align: center;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
}

/* hover lift */
.action-tile:hover {
    box-shadow: var(--shadow-large);
    transform: translateY(-2px);
}

/* 6. My documents */

/* help text */
.cell-help {
    margin: 0;
    color: var(--text-soft);
}

/* summary used as the toggle for the request form */

.dashboard-card summary .btn {
    width: auto;
}

/* document list */
.doc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.doc-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
}
.doc-list li:last-child {
    border-bottom: 0;
}
.doc-list strong {
    display: block;
    color: var(--navy);
}

.doc-meta {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-soft);
}

.doc-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.doc-actions .btn {
    width: auto;
}

/* 7. Billing page (my-billing.php) */

/* the three totals: stacked on phones, side by side on bigger screens */
.billing-summary {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
    .billing-summary {
        grid-template-columns: repeat(3, 1fr);
    }
}
.billing-label {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-soft);
}
.billing-amount {
    margin: 0.25rem 0 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
}

/* the tables scroll sideways on small phones instead of squashing */
.billing-table-wrap {
    overflow-x: auto;
}
.billing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.billing-table th,
.billing-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
.billing-table th {
    font-size: 0.8125rem;
    color: var(--text-soft);
}
