/* ============================================================
   BUTTON FORM + ALIGNMENT HELPERS
   ============================================================ */

.mms-us-button-form {
    display: inline-block;
    margin: 0.5em 0;
}

/* Applied when you use align="left|center|right" on [mms_button] */
.mms-us-align-left {
    display: block;
    text-align: left;
}

.mms-us-align-center {
    display: block;
    text-align: center;
}

.mms-us-align-right {
    display: block;
    text-align: right;
}

.mms-us-button {
    padding: 0.6em 1.4em;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
}

/* ============================================================
   Quantity controls next to the button
   ============================================================ */

.mms-us-qty-wrapper {
    display: inline-flex;
    align-items: center;
    margin-right: 0.6em;
    margin-bottom: 0.2em;
}

.mms-us-qty-label {
    font-size: 13px;
    margin-right: 4px;
}

.mms-us-qty-input {
    width: 3.2em;
    padding: 0.2em 0.3em;
    font-size: 14px;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* ============================================================
   CART + TABLES
   ============================================================ */

.mms-us-cart {
    max-width: 800px;
    margin: 1em auto;
}

/* Cart fragment wrapper (used inside popup overlay) */
.mms-us-cart-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.mms-us-cart-title {
    margin: 0 0 0.7em;
}

.mms-us-cart-table img {
    display: block;
}

.mms-us-cart-hold {
    margin-top: 0.25em;
    opacity: 0.85;
}

.mms-us-cart-table,
.mms-us-account-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.mms-us-cart-table th,
.mms-us-cart-table td,
.mms-us-account-table th,
.mms-us-account-table td {
    border-bottom: 1px solid #ddd;
    padding: 0.5em 0.6em;
    text-align: left;
}

.mms-us-cart-actions {
    display: flex;
    gap: 0.5em;
    justify-content: flex-end;
    margin-top: 0.5em;
}

/* ============================================================
   ACTION BUTTONS
   ============================================================ */

.mms-us-primary-button,
.mms-us-secondary-button,
.mms-us-link-button {
    padding: 0.4em 0.9em;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.mms-us-primary-button {
    font-weight: 600;
}

.mms-us-secondary-button {
    background: #eee;
}

.mms-us-link-button {
    background: none;
    border: none;
    color: #0073aa;
    text-decoration: underline;
    padding: 0;
}

/* ============================================================
   THANK YOU + ACCOUNT (purchases table)
   ============================================================ */

.mms-us-thankyou {
    max-width: 700px;
    margin: 1em auto;
    padding: 1.2em 1.5em;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.mms-us-account-subscriptions {
    max-width: 900px;
    margin: 1em auto;
}

/* ============================================================
   Account / Login UI
   ============================================================ */

.mms-us-account-page {
    max-width: 900px;
    margin: 2em auto;
}

/* Notices */
.mms-us-account-notice {
    padding: 0.6em 0.8em;
    border-radius: 6px;
    margin-bottom: 1em;
    font-size: 14px;
}
.mms-us-account-notice-info {
    background: #f5f5f5;
    border: 1px solid #ddd;
}
.mms-us-account-notice-error {
    background: #fdecea;
    border: 1px solid #e74c3c;
    color: #b10000;
}
.mms-us-account-notice-success {
    background: #e6f6ea;
    border: 1px solid #2ecc71;
    color: #1d6f3b;
}

/* Logged OUT: login + register grid */
.mms-us-account-auth {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
}
.mms-us-account-auth-col {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1.2em 1.4em;
    background: #fafafa;
}
.mms-us-account-auth h2 {
    margin-top: 0;
    margin-bottom: 0.8em;
}

/* Logged IN: nav tabs */
.mms-us-account-nav {
    margin-bottom: 1.3em;
    border-bottom: 1px solid #eee;
}
.mms-us-account-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.4em;
}
.mms-us-account-nav li {
    margin: 0;
}
.mms-us-account-nav a {
    display: block;
    padding: 0.4em 0;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    color: inherit;
}
.mms-us-account-nav li.is-active a {
    border-bottom-color: #222;
    font-weight: 600;
}
.mms-us-account-nav-logout a {
    color: #c0392b;
}

/* Forms */
.mms-us-form-row {
    margin-bottom: 0.8em;
}
.mms-us-form-row-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.mms-us-form-col {
    flex: 1 1 180px;
    min-width: 0;
}
.mms-us-form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0.25em;
}
.mms-us-form-row input[type="text"],
.mms-us-form-row input[type="email"],
.mms-us-form-row input[type="password"] {
    width: 100%;
    padding: 0.45em 0.6em;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
}
.mms-us-form-help {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 0.2em;
}
.mms-us-form-note {
    font-size: 13px;
    margin-top: 0.5em;
}

/* ============================================================
   Password eye toggle – label-based (no input resize)
   ============================================================ */

/* Make sure password fields never overflow the card */
.mms-us-account-page input[type="password"] {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Eye button directly on the label (generic) */
.mms-us-account-page .mms-us-password-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.4em;
    font-size: 0.85em;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

/* Optional style when password is visible */
.mms-us-account-page .mms-us-password-toggle[data-visible="1"] {
    opacity: 0.7;
}

/* Fieldset styling */
.mms-us-form-fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.8em 1em 1em;
    margin-top: 1em;
}
.mms-us-form-fieldset legend {
    padding: 0 0.4em;
    font-size: 14px;
    font-weight: 600;
}

.mms-us-required {
    color: #e74c3c;
}

/* Section wrapper */
.mms-us-account-section h2 {
    margin-top: 0;
}

/* Password eye next to label text (label-specific) */
.mms-us-password-toggle-label {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 0.9em;
    padding: 0;
    margin-left: 0.25em;
    line-height: 1;
}

.mms-us-password-toggle-label:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Slight dim on row when visible */
.mms-us-password-visible {
    opacity: 0.7;
}

/* ============================================================
   Popup cart overlay (centered, fixed)
   ============================================================ */

/* Full-screen dark overlay */
.mms-us-cart-overlay {
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0; /* in case inset is ignored */
    inset: 0;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999;
}

/* When active, show as flex and center panel */
.mms-us-cart-overlay--visible {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mms-us-cart-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

/* The white cart panel */
.mms-us-cart-overlay-panel {
    position: relative;
    background: #fff;
    max-width: 700px;
    width: 94%;
    max-height: 80vh;
    overflow: auto;
    padding: 1rem 1.2rem 1.3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Close button (×) in top-right of panel */
.mms-us-cart-overlay-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

/* ============================================================
   Floating cart bubble – fixed bottom-left
   ============================================================ */

#mms-us-cart-fab,
.mms-us-cart-fab {
    position: fixed !important;
    left: 16px;
    bottom: 16px;
    z-index: 99998;
    background: #222;
    color: #fff;
    padding: 0.45em 0.8em;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.35em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    font-size: 14px;
}

/* Cart icon inside the bubble */
.mms-us-cart-fab-icon {
    font-size: 16px;
}

/* Red count badge */
.mms-us-cart-fab-count {
    background: #e74c3c;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding: 0 4px;
}

/* ============================================================
   Inline cart button shortcode [mms_cart_button]
   ============================================================ */

.mms-us-cart-toggle {
    padding: 0.4em 0.9em;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    background: #222;
    color: #fff;
}

.mms-us-cart-toggle-count {
    margin-left: 0.3em;
    background: #e74c3c;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    padding: 0 4px;
}

/* ============================================================
   Simple responsive tweaks for small screens
   ============================================================ */

@media (max-width: 600px) {
    .mms-us-cart-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mms-us-cart-table th,
    .mms-us-cart-table td,
    .mms-us-account-table th,
    .mms-us-account-table td {
        font-size: 13px;
    }

    .mms-us-account-nav ul {
        gap: 0.9em;
    }

    .mms-us-form-row-inline {
        flex-direction: column;
    }
.mms-us-single-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.mms-us-single-product {
    margin-bottom: 40px;
}

.mms-us-single-header {
    margin-bottom: 20px;
    text-align: center;
}

.mms-us-single-title {
    font-size: 2.4rem;
    letter-spacing: 0.05em;
}

/* Layout: card on top, content below */
.mms-us-single-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* The product card */
.mms-us-single-card {
    display: flex;
    flex-direction: row;
    gap: 24px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    background: #fff;
}

/* Thumbnail */
.mms-us-single-thumb img {
    max-width: 360px;
    height: auto;
    border-radius: 10px;
    display: block;
}

/* Card right side */
.mms-us-single-meta {
    flex: 1;
}

.mms-us-single-price {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.mms-us-single-access {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 12px;
}

.mms-us-single-desc {
    margin-bottom: 16px;
}

.mms-us-single-access-link {
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Content area (your newsletter layout) */
.mms-us-single-content {
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .mms-us-single-card {
        flex-direction: column;
    }

    .mms-us-single-thumb img {
        max-width: 100%;
    }
}



/* ===========================
 * Course + Purchased Badge UI
 * =========================== */
.mms-us-badge-purchased{
    display:inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(46, 125, 50, 0.12);
    border: 1px solid rgba(46, 125, 50, 0.25);
    color: #2e7d32;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .02em;
}

.mms-us-seat-hold-note{
    margin: 10px 0 14px;
    font-size: 13px;
    opacity: .8;
}

.mms-us-course-note{
    margin: 8px 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.08);
    font-size: 13px;
}

.mms-us-course-lessons{
    margin-top: 18px;
}
.mms-us-course-lessons-title{
    margin: 0 0 12px;
    font-size: 1.5rem;
}

.mms-us-course-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.mms-us-course-lesson{
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.10);
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* Course catalog lesson card header (thumbnail + title) */
.mms-us-course-lesson-top{
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.mms-us-course-lesson-thumb{
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(0,0,0,0.04);
    display: block;
}
.mms-us-course-lesson-thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mms-us-course-lesson-meta{
    min-width: 0;
}

.mms-us-course-lesson-title{
    font-weight: 900;
    text-decoration: underline;
}

.mms-us-course-lesson-price{
    font-weight: 900;
    opacity: .85;
    margin-top: 4px;
}

.mms-us-course-lesson-desc{
    margin-top: 10px;
    font-size: 13px;
    opacity: .85;
}

.mms-us-course-lesson-actions{
    margin-top: 12px;
}

@media (max-width: 980px){
    .mms-us-course-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 620px){
    .mms-us-course-grid{
        grid-template-columns: 1fr;
    }
}

/* ===========================================================
   Compact cart detail summary (mobile)
   - Keeps the cart overlay from getting too tall on phones
   - Desktop + mobile use Details/Hide toggle
   =========================================================== */

.mms-us-cart-access-details .mms-us-cart-access-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.mms-us-cart-access-summary-text {
    display: inline-block;
    font-size: 13px;
    line-height: 1.25;
}

.mms-us-cart-access-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 12px;
    padding: 0.25em 0.55em;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.mms-us-cart-slots {
    margin: 0.35em 0 0.2em 1.1em;
}

/* Cart Access details: collapsed by default (desktop + mobile) */
/* Cart Access details: collapsed by default (desktop + mobile) */
.mms-us-cart-access-full {
    display: none !important;
}

.mms-us-cart-access-details.mms-us-open .mms-us-cart-access-full {
    display: block !important;
    margin-top: 0.35em;
}


@media (max-width: 640px) {
    .mms-us-cart-access-full {
        display: none;
    }

    .mms-us-cart-access-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    .mms-us-cart-access-summary-text {
        max-width: 220px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mms-us-cart-access-details.mms-us-open .mms-us-cart-access-full {
        display: block;
        margin-top: 0.35em;
    }
}

/* ============================================================
   FLASH / FORM NOTICES
   ============================================================ */
.mms-us-flash {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.15);
    font-weight: 600;
    line-height: 1.35;
}
.mms-us-flash-error {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
}
.mms-us-flash-success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.25);
}
.mms-us-flash-info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.25);
}

.mms-us-form-notice {
    margin: 10px 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(220, 38, 38, 0.25);
    background: rgba(220, 38, 38, 0.08);
    font-weight: 700;
}
