/*
 * Styles for the WordPress-side wrappers only. Everything the Laravel design
 * uses still comes from the bundled CSS in assets/css.
 */
.wpcf7-response-output {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #b7d8b7;
    background: #f4faf4;
    color: #24632a;
}

.wpcf7-response-output.form-error {
    border-color: #e0b4b4;
    background: #fdf7f7;
    color: #b52b27;
}

.captcha-image-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

#reload_captcha {
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
}

.crm-auth-messages:empty {
    display: none;
}

.crm-button-loading {
    display: none;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* The dashboard iframe fills the account area the same way Laravel's did. */
.content-section .dashboard-content {
    width: 100%;
    border: 0;
}

.main-container {
    min-height: 40vh;
}

/* ------------------------------------------------------------------
 * Account form presentation.
 *
 * The Laravel templates carry classes the converted bundle never shipped
 * rules for: the Grav form classes (label.inline, .required, .form-textarea,
 * .secondary-accent), the .button variants, and the Tailwind utilities the
 * profile/orders/invoice views were built with. Everything below is written
 * in this theme's own tokens so the account pages read as part of the site.
 * ------------------------------------------------------------------ */

/* Field labels: the contact page styled .form-label in its own scope only. */
.form-field .form-label { margin-bottom: 6px; }

.form-field label.inline,
.form-label label.inline {
    display: inline-block;
    margin-bottom: 6px;
    font-size: var(--text-font-size, 1rem);
    line-height: 1.5rem;
    font-weight: 600;
    color: inherit;
}

.required { color: #F04438; margin-left: 2px; }

/* Textareas were left to the browser while every input beside them was styled. */
.form-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    margin-bottom: 1rem;
    font: inherit;
    color: var(--color-black, #101828);
    background: var(--color-white, #fff);
    border: 1px solid #98a2b3;
    border-radius: var(--border-radius, 8px);
    resize: vertical;
}

.form-textarea:focus { outline: none; border-color: #fff; box-shadow: none; }

/* .button carried the whole design; primary/secondary were never defined, so
   the "I forgot my password" link rendered as a second identical CTA. */
.button.primary {
    background: var(--color-primary);
    color: var(--color-white, #fff);
    border-radius: var(--border-radius, 8px);
}

.button.secondary {
    background: none;
    background-image: none;
    border: 1px solid rgba(255, 255, 255, .35);
    color: var(--color-white, #fff);
    border-radius: var(--border-radius, 8px);
}

.button.secondary:hover { border-color: var(--color-white, #fff); }

/* Wrapper around the forgot-password submit. */
.secondary-accent { text-align: center; margin-top: 25px; }
.secondary-accent .button { display: inline-block; }

/* Feedback rendered by the CRM profile form. */
.crm-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--border-radius, 8px);
    border: 1px solid #b7d8b7;
    background: #f4faf4;
    color: #24632a;
}

.crm-message.danger { border-color: #e0b4b4; background: #fdf7f7; color: #b52b27; }
.crm-message.success { border-color: #b7d8b7; background: #f4faf4; color: #24632a; }

/* Orders table: .orders-table-wrapper was styled, the table itself was not. */
.orders-table { width: 100%; border-collapse: collapse; }

.orders-table th,
.orders-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(152, 162, 179, .35);
}

.orders-table th { font-weight: 600; white-space: nowrap; }
.orders-table tbody tr:last-child td { border-bottom: 0; }
.orders-table-wrapper { overflow-x: auto; }

/* Tailwind utilities the profile, orders and invoice views were authored with.
   Only the ones those templates actually use are defined here. */
.max-w-6xl { max-width: 72rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.rounded-lg { border-radius: var(--border-radius, 8px); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25); }
.shadow-gray-300 { --tw-shadow-color: #d1d5db; }
.border { border-width: 1px; border-style: solid; }
.border-gray-200 { border-color: rgba(152, 162, 179, .35); }
.p-12 { padding: 3rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-8 { margin-bottom: 2rem; }
.text-4xl { font-size: var(--title-lg-font-size, 2.25rem); line-height: 1.2; }
.font-bold { font-weight: 700; }
.inline-block { display: inline-block; }
.justify-between { justify-content: space-between; }
.space-x-2 > * + * { margin-left: .5rem; }
.no-underline { text-decoration: none; }
.h-4 { height: 1rem; }
.w-4 { width: 1rem; }
.w-3 { width: .75rem; }
.ml-1 { margin-left: .25rem; }
.mr-1 { margin-right: .25rem; }
.icon-tabler { vertical-align: middle; }

@media (max-width: 767px) {
    .p-12 { padding: 1.5rem; }
    .orders-table th,
    .orders-table td { padding: 10px 12px; }
}

/* The profile page's "Cancel Subscription" link carries .button-secondary and
   .danger, neither of which had a rule, so a destructive action rendered as
   the page's main call to action. */
.button.button-secondary {
    background: none;
    background-image: none;
    border: 1px solid rgba(255, 255, 255, .35);
    color: var(--color-white, #fff);
    border-radius: var(--border-radius, 8px);
}

.button.danger,
.button.button-secondary.danger {
    border-color: #F04438;
    color: #F04438;
    background: none;
    background-image: none;
}

.button.danger:hover,
.button.button-secondary.danger:hover { background: rgba(240, 68, 56, .08); }

/* Paired with .w-3 on the arrow icon; the template writes h3 for h-3. */
.h3 { height: .75rem; }

/* ------------------------------------------------------------------
 * CRM plugin card override.
 *
 * The templates wrap their markup in .crm-login-form / .crm-forgot-password-form
 * because the plugin's script looks for those hooks. The plugin's own
 * crm-auth-frontend.css also paints them as a standalone card --
 * max-width:400px, background:#fff, 1px #ddd border, shadow -- so a white panel
 * rendered inside the theme's own .form-login-wrapper card and swallowed the
 * white label and link text. The theme supplies the card; strip the plugin's.
 * ------------------------------------------------------------------ */
.form-login-wrapper .crm-login-form,
.form-login-wrapper .crm-forgot-password-form,
.form-login-wrapper .crm-change-password-form,
.content-section .crm-login-form,
.content-section .crm-forgot-password-form,
.content-section .crm-change-password-form {
    max-width: none;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* The plugin also hard-codes its buttons to WordPress admin blue. The theme's
   own .button rules own these; keep the plugin from repainting them. */
.form-login-wrapper .crm-login-button,
.form-login-wrapper .crm-reset-password-button,
.form-login-wrapper .crm-change-password-button,
.content-section .crm-login-button,
.content-section .crm-reset-password-button,
.content-section .crm-change-password-button {
    background: var(--color-primary);
    color: var(--color-white, #fff);
    border-radius: var(--border-radius, 8px);
}

/* Inside the login card the theme styles .secondary as a plain centred text
   link (.form-action-wrapper .secondary: background:none, no padding), so the
   generic outline above must not box it. */
.form-login-wrapper #grav-login .form-action-wrapper .button.secondary {
    border: 0;
    padding: 0;
}

/* ------------------------------------------------------------------
 * Account area text on the dark shell.
 *
 * The Laravel design sat the orders table and the profile columns on light
 * cards -- .orders-table-wrapper.bg-white, thead #f5f5f5, .content-section-profile
 * #fefefe -- and baseStyles unsets all three so they render straight on the dark
 * body. Nothing declares a text colour for that area and the bundle never sets
 * one on body either, so the table head, the rows, the "No orders found." row
 * and the Profile/Subscription headings fell back to the browser default black
 * and vanished against the page. The two account links had no colour rule at
 * all and came out as the browser's default blue/purple.
 * ------------------------------------------------------------------ */
.orders-table-wrapper,
.content-section-profile,
.invoice-detail {
    color: var(--color-white, #fff);
}

.orders-table-wrapper table th,
.orders-table-wrapper table td,
.content-section-profile h1,
.content-section-profile h2,
.content-section-profile h3,
.content-section-profile h4,
.content-section-profile label,
.invoice-detail th,
.invoice-detail td {
    color: var(--color-white, #fff);
}

/* The head row lost its grey fill with the card behind it; a faint tint keeps
   it reading as a head rather than as one more body row. */
.orders-table-wrapper table thead {
    background-color: rgba(255, 255, 255, .06);
}

/* "My Orders" on the profile page and "View Invoice" in each row. */
.btn__simple.my-orders,
.orders-table td a.btn,
.invoice-detail td a.btn {
    color: var(--color-white, #fff);
}

.btn__simple.my-orders:hover,
.orders-table td a.btn:hover,
.invoice-detail td a.btn:hover {
    opacity: .75;
}

/* ==================================================================
 * Cookie modal.
 *
 * The converted modal kept three things the WordPress build cannot use as-is:
 * a hard-coded button colour that belongs to no palette on this site, a 2s
 * book-page-turn animation, and a centred dialog with nothing behind it. The
 * close X was also styled and then switched off with display:none, and its
 * stroke was painted white against a light panel. On top of that the panel
 * itself was light while every page around it is dark.
 *
 * Repainted here in the theme's own tokens: a dark panel that belongs to the
 * page, the brand accent on the primary action, a ghost secondary, a real
 * backdrop (inserted by the cookie script), a short fade, and a close X that
 * is visible and follows the text colour.
 * ================================================================== */
.cookie-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999999999;
    background: rgba(6, 7, 9, .68);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s ease, visibility .24s ease;
}

.cookie-backdrop.show-cookie {
    opacity: 1;
    visibility: visible;
}

#cookie-modal {
    --cookie-surface: #17191D;
    --cookie-border: rgba(255, 255, 255, .14);
    --cookie-text: var(--color-white, #fff);
    --cookie-muted: rgba(255, 255, 255, .70);
    --cookie-accent: var(--color-primary);
    --cookie-accent-fg: #fff;

    box-sizing: border-box;
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 30px;
    border-radius: 14px;
    border: 1px solid var(--cookie-border);
    background: var(--cookie-surface);
    color: var(--cookie-text);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    position: fixed;
    top: 50%;
    left: 50%;
    /* Every bundle ships .show-cookie{bottom:-360px} / .hide-cookie{bottom:-1px}
       from the original slide-up banner. Those are bare class rules, so they
       still apply to the centred dialog: top and bottom both resolved and the
       box stretched to ~890px with the content stranded at the top. The id
       outranks the class, so clearing the offsets here settles it. */
    right: auto;
    bottom: auto;
    /* The bundles disagree wildly here -- 99 in one, 10000000000 in another --
       and anything below the backdrop puts the scrim on top of the dialog. */
    z-index: 10000000001;
    transform: translate(-50%, -46%);
    opacity: 0;
    visibility: hidden;
    /* Kills the inherited 2s page-turn / flip keyframes in every bundle. */
    animation: none !important;
    filter: none !important;
    transition: opacity .24s ease, transform .24s ease, visibility .24s ease;
}

#cookie-modal.show-cookie {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

#cookie-modal.hide-cookie {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -46%);
}

/* The "fold" gradient belonged to the page-turn animation. */
#cookie-modal::before {
    display: none !important;
}

#cookie-modal .modal-close {
    display: flex !important;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--cookie-muted);
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

#cookie-modal .modal-close:hover {
    color: var(--cookie-text);
    background: rgba(255, 255, 255, .08);
}

#cookie-modal .modal-close svg path {
    stroke: currentColor !important;
}

#cookie-modal .content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

#cookie-modal .icon-text-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 28px;
}

#cookie-modal .content .icon {
    display: flex;
    width: 40px;
    max-width: 40px;
    height: 40px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

#cookie-modal .content .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#cookie-modal .content .icon img:hover {
    transform: none;
}

#cookie-modal .content .cookie-title {
    margin: 0;
    color: var(--cookie-text);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

#cookie-modal .content .cookie-desc {
    width: 100%;
    color: var(--cookie-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

#cookie-modal .content .cookie-desc a {
    color: var(--cookie-text);
    font-weight: 600;
    text-decoration: underline;
}

/* The templates all emit <div class="terms-text-wrapper"></div> with nothing in
   it -- only some bundles bothered to hide it, and where they did not it opened
   a second flex gap between the text and the buttons. */
#cookie-modal .terms-text-wrapper:empty {
    display: none;
}

#cookie-modal .action-wrapper {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 4px;
}

#cookie-modal .action-wrapper .cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    padding: 11px 22px !important;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, opacity .2s ease;
}

#cookie-modal .action-wrapper .cookie-btn:hover,
#cookie-modal .action-wrapper .cookie-btn:active {
    transform: none;
}

#cookie-modal .action-wrapper .cookie-btn img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

#cookie-modal #decline-cookie {
    background: none !important;
    background-color: transparent !important;
    border-color: var(--cookie-border);
    color: var(--cookie-text);
}

#cookie-modal #decline-cookie:hover {
    border-color: var(--cookie-text);
    background-color: rgba(255, 255, 255, .08) !important;
}

/* Two ids are in use across these themes; the second was never given a rule,
   so the primary action rendered as an unstyled browser button. */
#cookie-modal #cookie-button,
#cookie-modal #accept-cookie-button {
    background: var(--cookie-accent) !important;
    color: var(--cookie-accent-fg) !important;
    border: 0;
}

#cookie-modal #cookie-button:hover,
#cookie-modal #accept-cookie-button:hover {
    opacity: .88;
}

#cookie-modal #cookie-button:hover img,
#cookie-modal #accept-cookie-button:hover img {
    transform: none;
}

@media screen and (max-width: 540px) {
    #cookie-modal {
        width: calc(100% - 24px);
        padding: 22px;
    }

    #cookie-modal .action-wrapper {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    #cookie-modal .action-wrapper .cookie-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #cookie-modal,
    .cookie-backdrop {
        transition: none;
    }
}

/* ------------------------------------------------------------------
 * .text-brand headings.
 *
 * The bundles' only rule for this class is scoped to the contact page's email
 * section, where it resolves to var(--color-white). Every other heading that
 * carries it -- Profile, Subscription, the policy pages -- matched no rule at
 * all and fell back to the browser default black, which is invisible on the
 * dark shell. The same gap applies to the headings inside .main-container: the
 * bundle sets their size and weight and never their colour.
 * ------------------------------------------------------------------ */
.text-brand {
    color: var(--color-white, #fff);
}

.main-container h1,
.main-container h2,
.main-container h3,
.main-container h4,
.main-container h5,
.main-container h6 {
    color: var(--color-white, #fff);
}
