@font-face {
    font-family: "ArabStyle";
    src: url("TT0690M_.TTF") format("truetype");
    font-style: normal;
    font-weight: normal;
    font-display: swap;
}


/* ============================================================
   Alhazred
   Base global
   ============================================================ */

:root {
    /* Brand */
    --color-brand: #ff0000;
    --color-brand-dark: #4a0000;
    /* Typography */
    --font-family-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-family-brand: "ArabStyle", Georgia, serif;
    /* Layout */
    --content-width: 67.35%;
    /* Light theme */
    --color-background: #e4e4ee;
    --color-surface: #ffffff;
    --color-navigation: #eeeeee;
    --color-text: #181818;
    --color-text-secondary: #555555;
    --color-border: #d5d5d5;
    --color-link: #5b2c83;
    --color-navprincipal-background: #666;
    --color-navprincipal-text: #e6e6e6;
}


/* ============================================================
   Dark theme
   ============================================================ */

[data-theme="dark"] {
    --color-background: #000000;
    --color-surface: #242424;
    --color-navigation: #303030;
    --color-text: #d9d9d9; /*#eeeeee;*/
    --color-text-secondary: #b8b8b8;
    --color-border: #3a3a3a;
    --color-link: #c49be8;
    --color-navprincipal-background: #666;
    --color-navprincipal-text: #e6e6e6;
}


/* ============================================================
   Reset
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

html {
    font-family: var(--font-family-base);
}

body {
    min-width: 320px;
    background-color: var(--color-background);
    color: var(--color-text);
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--color-link);
}


/* ============================================================
   Central content container
   ============================================================ */

.alhazred-container {
    width: var(--content-width);
    margin-inline: auto;
}


/* ============================================================
   Home - Common Stripe
   ============================================================ */

.stripe-header {
    margin-bottom: 1.75rem;
    text-align: center;
}

    .stripe-header h1 {
        margin: 0;
        font-family: var(--font-family-brand);
        font-size: clamp(1.5rem, 5vw, 1.7rem);
        font-weight: bold;
        line-height: 1.2;
        color: var(--color-text);
    }

.stripe-separator {
    height: 6px;
    margin-inline: -1rem;
    background-color: var(--color-background);
}


/* ============================================================
   Home - Featured Books
   ============================================================ */

.featured-books {
    width: 100%;
    padding-block: 1rem 0.75rem;
}

.featured-books-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
}

.featured-book {
    flex: 0 1 calc((100% - 4rem) / 3);
    width: calc((100% - 4rem) / 3);
    min-width: 0;
    margin: 0;
    text-align: center;
}

.featured-book-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    color: var(--color-text);
    text-decoration: none;
}

.featured-book-cover {
    width: auto;
    max-width: 260px;
    height: auto;
    max-height: 325px;
    object-fit: contain;
}

.featured-book-title {
    display: block;
    margin-top: 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.featured-book-link:hover .featured-book-title,
.featured-book-link:focus .featured-book-title {
    text-decoration: underline;
}


/* ============================================================
   Home - Featured Courses
   ============================================================ */

.featured-courses {
    width: 100%;
    padding-block: 1rem 0.75rem;
}

.featured-courses-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
}

.featured-course {
    flex: 0 1 calc((100% - 4rem) / 3);
    width: calc((100% - 4rem) / 3);
    min-width: 0;
    margin: 0;
    text-align: center;
}

.featured-course-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    color: var(--color-text);
    text-decoration: none;
}

.featured-course-image {
    width: auto;
    max-width: 260px;
    height: auto;
    max-height: 325px;
    object-fit: contain;
}

.featured-course-title {
    display: block;
    margin-top: 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.featured-course-link:hover .featured-course-title,
.featured-course-link:focus .featured-course-title {
    text-decoration: underline;
}


/* ============================================================
   Home - Catalog Message
   ============================================================ */

.catalog-message {
    margin: 1.5rem auto 1.3rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

    .catalog-message a {
        color: var(--color-link);
    }


/* ============================================================
   Home - Stripe States
   ============================================================ */

.stripe-status {
    width: 100%;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.stripe-error {
    color: var(--color-text);
}



/* ============================================================
   Responsive - Global / Featured Content
   Desktop base > 1280px
   ============================================================ */

@media (max-width: 1280px) {

    .alhazred-container {
        width: 90%;
    }
}

@media (max-width: 800px) {

    .alhazred-container {
        width: 100%;
        padding-inline: 1rem;
    }

    .featured-book,
    .featured-course {
        flex: 0 1 calc((100% - 2rem) / 2);
        width: calc((100% - 2rem) / 2);
    }

    .featured-book-cover,
    .featured-course-image {
        max-width: 100%;
        max-height: 22rem;
    }
}

@media (max-width: 479px) {

    .featured-books-grid,
    .featured-courses-grid {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
    }

    .featured-book,
    .featured-course {
        flex: 0 1 100%;
        width: 100%;
    }
}

/* ============================================================
   System Razor Pages
   CeaseAndDesist / NoDisponible / ServicioNoDisponible
   ============================================================ */

.system-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-background);
}

/* Header */

.system-header {
    width: 100%;
    background-color: var(--color-brand);
    color: #ffffff;
}

.system-brand {
    display: inline-block;
    padding: 0.5rem 0.5rem;
    font-family: var(--font-family-brand);
    font-size: clamp(2rem, 5vw, 2.5rem);
    line-height: 1.1;
    color: #ffffff;
    text-decoration: none;
}

    .system-brand:hover,
    .system-brand:focus {
        color: #ffffff;
        text-decoration: none;
    }

/* Navigation */

.system-navigation {
    width: 100%;
    background-color: var(--color-background);
    font-size: 105%;
}

    .system-navigation .alhazred-container {
        background-color: var(--color-navigation);
        border-bottom: 1px solid var(--color-border);
    }

.navigation {
    position: relative;
    width: 100%;
}

.navigation-content {
    display: block;
    width: 100%;
}

.navigation-menu-items {
    width: 100%;
}

.navigation-content .navigation-menu-item {
    display: inline-block;
    width: auto;
    margin: 0;
    padding: 0.55rem 0.7rem;
    color: var(--color-text);
    text-decoration: none;
}

    .navigation-content .navigation-menu-item:hover {
        background-color: var(--color-navprincipal-background);
        color: var(--color-navprincipal-text);
    }

/* Main */

.system-main {
    flex: 1;
    width: 100%;
    padding-bottom: 1.25rem;
}

/* Floating message panel */

.system-message-panel {
    width: 100%;
    margin-top: 0.4rem;
    padding: 2.25rem 2rem 1rem;
    background-color: var(--color-surface);
    color: var(--color-text);
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

    .system-message-panel h1 {
        margin: 0 0 1.5rem;
        font-family: var(--font-family-base);
        font-size: 2rem;
        font-weight: 700;
        line-height: 1.25;
        color: var(--color-text);
    }

.system-message-content {
    width: 100%;
    margin-inline: auto;
}

    .system-message-content p {
        margin: 0 0 1.25rem;
        font-size: 1.02rem;
        font-weight: normal;
        line-height: 1.6;
        color: var(--color-text);
    }

.system-message-home {
    display: inline-block;
    margin-top: 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
    text-decoration: none;
}

    .system-message-home:hover,
    .system-message-home:focus {
        color: var(--color-link);
        text-decoration: underline;
    }

/* Footer */

.system-footer {
    width: 100%;
    margin-top: 1rem;
    padding-block: 1.25rem;
    background-color: var(--color-brand-dark);
    color: #ffffff;
    text-align: center;
}

    .system-footer p {
        margin: 0;
    }

.system-footer-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

    .system-footer-links a {
        color: #ffffff;
        text-decoration: none;
        padding: 10px;
    }

        .system-footer-links a:hover {
            background-color: #660000;
        }

/* Responsive */

@media (max-width: 800px) {

    .navigation-content {
        display: none;
    }

        .navigation-content .navigation-menu-item {
            display: block;
            width: 100%;
            padding: 0.65rem 0.5rem;
        }

    .system-header {
        min-height: 3.75rem;
        padding-inline: 0.5rem;
    }

    .system-navigation .alhazred-container {
        padding-inline: 0;
    }

    .system-navigation-links {
        min-height: 2.5rem;
        gap: 1rem;
        padding-inline: 1rem;
    }

    .system-main .alhazred-container {
        padding-inline: 1rem;
    }

    .system-message-panel {
        margin-top: 1rem;
        padding: 1.75rem 1rem 1.25rem;
    }

        .system-message-panel h1 {
            margin-bottom: 1.25rem;
            font-size: 1.65rem;
        }

    .system-message-content p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .system-message-home {
        margin-top: 1rem;
        font-size: 1.25rem;
    }

    .system-footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}


/* ============================================================
   Books Catalog
   ============================================================ */

.books-catalog {
    width: calc(100% + 2rem);
    margin-inline: -1rem;
    background-color: var(--color-background);
}

.books-page-status {
    width: 100%;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.books-page-error {
    color: var(--color-text);
}


/* ============================================================
   Books Catalog - Book Stripe
   ============================================================ */

.book-stripe {
    width: 100%;
    margin: 0 0 6px;
    padding: 1rem 1rem 1.5rem;
    background-color: var(--color-surface);
    color: var(--color-text);
}

    .book-stripe:last-child {
        margin-bottom: 0;
    }

.book-stripe-header {
    margin-bottom: 1.75rem;
    text-align: center;
}

    .book-stripe-header h1 {
        margin: 0;
        font-family: var(--font-family-brand);
        font-size: clamp(1.5rem, 5vw, 1.7rem);
        font-weight: bold;
        line-height: 1.2;
        color: var(--color-text);
    }


/* ============================================================
   Books Catalog - Editions
   ============================================================ */

.book-editions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    gap: 2rem;
}

.book-edition {
    flex: 0 1 calc((100% - 4rem) / 3);
    width: calc((100% - 4rem) / 3);
    min-width: 0;
    margin: 0;
    text-align: center;
}

.book-edition-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    color: var(--color-text);
    text-decoration: none;
}

.book-edition-cover {
    width: auto;
    max-width: 260px;
    height: auto;
    max-height: 325px;
    object-fit: contain;
}

.book-edition-title {
    display: block;
    margin-top: 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.book-edition-link:hover .book-edition-title,
.book-edition-link:focus .book-edition-title {
    text-decoration: underline;
}


/* ============================================================
   Books Catalog - Stripe States
   ============================================================ */

.book-stripe-status {
    width: 100%;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.book-stripe-error {
    color: var(--color-text);
}


/* ============================================================
   Books Catalog - Responsive Editions
   ============================================================ */

@media (max-width: 800px) {

    .book-edition {
        flex: 0 1 calc((100% - 2rem) / 2);
        width: calc((100% - 2rem) / 2);
    }

    .book-edition-cover {
        max-width: 100%;
        max-height: 22rem;
    }


    .books-catalog {
        width: calc(100% + 2rem);
        margin-inline: -1rem;
    }

    .book-stripe {
        padding: 1.75rem 1rem 1.25rem;
    }

    .book-stripe-header {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 479px) {

    .book-editions {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
    }

    .book-edition {
        flex: 0 1 100%;
        width: 100%;
    }
}


/* ============================================================
   Courses Catalog
   ============================================================ */

.courses-catalog {
    width: calc(100% + 2rem);
    margin-inline: -1rem;
    background-color: var(--color-background);
}

.courses-page-status {
    width: 100%;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.courses-page-error {
    color: var(--color-text);
}


/* ============================================================
   Courses Catalog - Course Stripe
   ============================================================ */

.course-stripe {
    width: 100%;
    margin: 0 0 6px;
    padding: 1rem 1rem 1.5rem;
    background-color: var(--color-surface);
    color: var(--color-text);
    text-align: center;
}

    .course-stripe:last-child {
        margin-bottom: 0;
    }

.course-stripe-header {
    margin-bottom: 1.75rem;
    text-align: center;
}

    .course-stripe-header h1 {
        margin: 0;
        font-family: var(--font-family-brand);
        font-size: clamp(1.5rem, 5vw, 1.7rem);
        font-weight: bold;
        line-height: 1.2;
        color: var(--color-text);
    }


/* ============================================================
   Courses Catalog - Description
   ============================================================ */

.course-description {
    width: 100%;
    max-width: 900px;
    margin-inline: auto;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    color: var(--color-text);
}


/* ============================================================
   Courses Catalog - Course Information
   ============================================================ */

.course-cost,
.course-date {
    margin: 1.5rem auto 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.course-detail-link {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: red; /*var(--color-text);*/
    text-decoration: none;
}

    .course-detail-link:hover,
    .course-detail-link:focus {
        color: red; /*var(--color-link);*/
        text-decoration: underline;
    }


/* ============================================================
   Courses Catalog - Responsive
   ============================================================ */

@media (max-width: 800px) {

    .courses-catalog {
        width: calc(100% + 2rem);
        margin-inline: -1rem;
    }

    .course-stripe {
        padding: 1.75rem 1rem 1.5rem;
    }

    .course-stripe-header {
        margin-bottom: 1.5rem;
    }

    .course-description {
        font-size: 1rem;
        line-height: 1.5;
    }

    .course-cost,
    .course-date,
    .course-detail-link {
        font-size: 1rem;
    }
}

/* ============================================================
   Donation Stripe
   ============================================================ */

.donation-stripe {
    width: 100%;
    padding: 1.5rem 1rem;
    background-color: var(--color-surface);
    color: var(--color-text);
    text-align: center;
}

.donation-title {
    margin: 0 0 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text);
}

.donation-instructions {
    margin: 0 auto 1.25rem;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    color: var(--color-text);
}

.donation-paypal {
    display: inline-block;
    line-height: 0;
}

    .donation-paypal img {
        display: block;
        width: auto;
        height: auto;
        margin-inline: auto;
    }


/* ============================================================
   Donation Stripe - Responsive
   ============================================================ */

@media (max-width: 800px) {

    .donation-stripe {
        padding: 1.5rem 1rem;
    }

    .donation-instructions {
        font-size: 1rem;
        line-height: 1.5;
    }
}

/* ============================================================
   Book Detail / Sale
   ============================================================ */

.book-detail-page {
    width: 100%;
}

.book-detail-status {
    padding: 3rem 2rem;
    background-color: var(--color-surface);
    text-align: center;
    color: var(--color-text-secondary);
}

.book-detail-error {
    color: var(--color-text);
}

.book-sale-stripe {
    width: 100%;
    padding: 1rem 0.75rem 1.75rem;
    background-color: var(--color-surface);
    color: var(--color-text);
}

.book-sale-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.book-sale-form-column,
.book-sale-info-column {
    min-width: 0;
}

.book-sale-form-title {
    margin: 0 0 1rem;
    font-size: 1.18rem;
    font-weight: 700;
    text-align: center;
}

.book-sale-email-note {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    text-align: left;
}

.book-sale-edition-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: end;
    margin: 0 0 1.5rem;
}

.book-sale-edition-card {
    min-width: 0;
    margin: 0;
    text-align: center;
}

    .book-sale-edition-card img {
        display: block;
        width: 100%;
        max-width: 145px;
        height: 230px;
        margin: 0 auto;
        object-fit: contain;
    }

    .book-sale-edition-card figcaption {
        min-height: 3.25rem;
        font-size: 0.95rem;
        font-weight: bold;
        line-height: 1.25;
        color: var(--color-text);
    }

.book-sale-shipping-note {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--color-text);
}

    .book-sale-shipping-note p {
        margin: 0 0 0.65rem;
    }

    .book-sale-shipping-note ul {
        margin: 0 0 0.65rem 1.25rem;
        padding: 0;
    }

.book-sale-form {
    width: 100%;
    padding: 1rem 0.8rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-navigation);
}

.book-sale-field {
    margin: 0 0 0.75rem;
}

    .book-sale-field > label,
    .book-sale-field-label {
        display: block;
        margin: 0 0 0.3rem;
        font-size: 0.95rem;
        line-height: 1.35;
        color: var(--color-text);
    }

.book-sale-required {
    color: #ff0000;
}

.book-sale-options {
    display: grid;
    grid-template-columns: 20px max-content;
    column-gap: 0.55rem;
    row-gap: 0.45rem;
    align-items: center;
    justify-content: start;
}

.book-sale-option {
    display: contents;
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--color-text);
    cursor: pointer;
}

    .book-sale-option input[type="radio"] {
        width: 20px;
        height: 20px;
        margin: 0;
        margin-left: 30px;
        padding: 0;
        justify-self: center;
        cursor: pointer;
    }

    .book-sale-option span {
        margin: 0;
        margin-left: 20px;
        padding: 0;
        white-space: nowrap;
        justify-self: start;
    }

.book-sale-digital-note {
    margin: 0.8rem 0 1.35rem;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--color-text);
}

    .book-sale-digital-note > strong {
        display: block;
        margin-bottom: 0.75rem;
        text-align: center;
        color: #ff0000;
    }

    .book-sale-digital-note ol {
        margin: 0;
        padding-left: 1.35rem;
    }

    .book-sale-digital-note li {
        margin-bottom: 0.4rem;
    }

.book-sale-form .book-sale-field input,
.book-sale-form .book-sale-field textarea,
.book-sale-form .book-sale-field select {
    box-sizing: border-box;
    width: 100%;
    max-width: 390px;
}

.book-sale-address-fields {
    margin-top: 0.25rem;
}

.book-sale-field-help {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--color-text-secondary);
}

.book-sale-hidden-fields {
    display: none !important;
}

.book-sale-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--color-text);
}

.book-sale-summary-total {
    font-weight: 700;
}

.book-sale-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.book-sale-paypal,
.book-sale-cancel {
    min-height: 2.35rem;
    padding: 0.5rem 1rem;
    border: 0;
    background-color: #003b70;
    color: #ffffff;
    font-weight: 400;
    cursor: pointer;
}

.book-sale-paypal {
    min-width: 250px;
}

.book-sale-cancel {
    min-width: 115px;
}

    .book-sale-paypal:hover,
    .book-sale-cancel:hover {
        filter: brightness(1.1);
    }

.book-sale-api-error {
    margin: 1rem 0 0;
    font-weight: 700;
    line-height: 1.4;
    color: #b00020;
}

[data-theme="dark"] .book-sale-api-error {
    color: #ff8a9a;
}

.book-sale-book-title {
    margin: 0 0 1.1rem;
    font-family: var(--font-family-brand);
    font-size: 1.85rem;
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    color: var(--color-text);
}

.book-sale-subtitle {
    margin: 0 0 2rem;
    font-family: var(--font-family-brand);
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.3;
    text-align: center;
    color: var(--color-text);
}

.book-sale-isbn-list {
    margin: 0 auto 1.5rem;
    text-align: center;
}

    .book-sale-isbn-list p {
        margin: 0 0 0.35rem;
        font-size: 1rem;
        line-height: 1.35;
    }

.book-sale-description {
    margin: 0 0 1.75rem;
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: justify;
    color: var(--color-text);
}

    .book-sale-description p {
        margin-top: 0;
    }

    .book-sale-description ul,
    .book-sale-description ol {
        padding-left: 1.3rem;
    }

.book-sale-main-cover {
    display: block;
    width: auto;
    max-width: 78%;
    max-height: 620px;
    margin: 0 auto;
    object-fit: contain;
}

.book-sale-no-editions {
    margin: 1.5rem 0;
    text-align: center;
    color: var(--color-text-secondary);
}

.book-sale-form .errorlabel {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #b00020;
}

[data-theme="dark"] .book-sale-form .errorlabel {
    color: #ff8a9a;
}


/* ============================================================
   Book Detail / Sale - Responsive
   ============================================================ */

@media (max-width: 800px) {

    .book-sale-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .book-sale-info-column {
        order: -1;
    }

    .book-sale-main-cover {
        max-width: 440px;
        width: 100%;
    }
}

@media (max-width: 800px) {

    .book-sale-stripe {
        padding: 1.5rem 0;
    }

    .book-sale-layout {
        gap: 1.5rem;
    }

    .book-sale-edition-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.35rem;
    }

    .book-sale-edition-card img {
        max-width: 100px;
        height: 155px;
    }

    .book-sale-edition-card figcaption {
        font-size: 0.78rem;
    }

    .book-sale-form {
        padding: 0.9rem 0.7rem;
    }

        .book-sale-form .book-sale-field input,
        .book-sale-form .book-sale-field textarea,
        .book-sale-form .book-sale-field select {
            max-width: 100%;
        }

    .book-sale-paypal,
    .book-sale-cancel {
        width: 100%;
        min-width: 0;
    }

    .book-sale-main-cover {
        max-width: 100%;
    }
}

/* ============================================================
   Course Detail / Sale
   ============================================================ */

.course-sale-page {
    width: 100%;
}

.course-sale-status {
    width: 100%;
    padding: 3rem 2rem;
    background-color: var(--color-surface);
    color: var(--color-text-secondary);
    text-align: center;
}

.course-sale-error {
    color: var(--color-text);
}

.course-sale-stripe {
    width: 100%;
    padding: 1rem 1rem 1.75rem;
    background-color: var(--color-surface);
    color: var(--color-text);
}

.course-sale-title {
    margin: 0 0 1.5rem;
    font-family: var(--font-family-brand);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    color: var(--color-text);
}

.course-sale-description,
.course-sale-description-secondary {
    width: 100%;
    margin-inline: auto;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
}

.course-sale-description {
    margin-bottom: 1rem;
}

.course-sale-description-secondary {
    margin-top: 1.5rem;
}

    .course-sale-description p,
    .course-sale-description-secondary p {
        margin-top: 0;
        margin-bottom: 1rem;
    }

    .course-sale-description ul,
    .course-sale-description ol,
    .course-sale-description-secondary ul,
    .course-sale-description-secondary ol {
        padding-left: 1.5rem;
    }

.course-sale-email-note {
    margin: 1rem 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--color-text);
}

.course-sale-form-title {
    margin: 1.25rem 0 1rem;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}

.course-sale-form-wrapper {
    width: 100%;
    max-width: 760px;
    margin: 0 auto 1.5rem;
}

.course-sale-required-note {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--color-text);
}

.course-sale-form {
    width: 100%;
    padding: 1.25rem 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-navigation);
}

.course-sale-field {
    width: 100%;
    margin: 0 0 1rem;
}

    .course-sale-field > label {
        display: block;
        margin: 0 0 0.35rem;
        font-size: 0.95rem;
        line-height: 1.35;
        color: var(--color-text);
    }

.course-sale-required {
    color: #ff0000;
}

.course-sale-form .course-sale-field input,
.course-sale-form .course-sale-field textarea,
.course-sale-form .course-sale-field select {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    min-height: 2.25rem;
}

.course-sale-hidden-fields {
    display: none !important;
}

.course-sale-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.course-sale-paypal,
.course-sale-cancel {
    min-height: 2.35rem;
    padding: 0.5rem 1rem;
    border: 0;
    background-color: #003b70;
    color: #ffffff;
    font-weight: 400;
    cursor: pointer;
}

.course-sale-paypal {
    min-width: 260px;
}

.course-sale-cancel {
    min-width: 115px;
}

    .course-sale-paypal:hover,
    .course-sale-cancel:hover {
        filter: brightness(1.1);
    }

.course-sale-api-error {
    margin: 1rem 0 0;
    font-weight: 700;
    line-height: 1.4;
    color: #b00020;
}

[data-theme="dark"] .course-sale-api-error {
    color: #ff8a9a;
}

.course-sale-form .errorlabel {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #b00020;
}

[data-theme="dark"] .course-sale-form .errorlabel {
    color: #ff8a9a;
}

.course-sale-contribution {
    margin: 1.5rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text);
}

/* ============================================================
   Course Detail / Sale - Responsive
   ============================================================ */

@media (max-width: 800px) {
    .course-sale-stripe {
        padding: 1.5rem 0;
    }

    .course-sale-title {
        margin-bottom: 1.25rem;
    }

    .course-sale-form-wrapper {
        max-width: 100%;
    }

    .course-sale-form {
        padding: 1rem 0.75rem;
    }

        .course-sale-form .course-sale-field input,
        .course-sale-form .course-sale-field textarea,
        .course-sale-form .course-sale-field select {
            max-width: 100%;
        }

    .course-sale-actions {
        flex-direction: column;
    }

    .course-sale-paypal,
    .course-sale-cancel {
        width: 100%;
        min-width: 0;
    }

    .course-sale-description,
    .course-sale-description-secondary {
        font-size: 1rem;
        line-height: 1.5;
    }
}