/* ==========================================================================
   ZMG Styles — v3.0
   Sections: Base Buttons | Login/Register/Forgot/Reset | Account Nav |
             Dashboard | Module Rows | Status Colors | Badges |
             Upgrade Modal
   ========================================================================== */


/* ==========================================================================
   BASE BUTTONS
   ========================================================================== */

.academy-button {
    display: inline-block;
    background: linear-gradient(135deg, #7b1e3c, #9f294f);
    color: #fff;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(123, 30, 60, 0.25);
}

.academy-button:hover,
.academy-button:focus {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(123, 30, 60, 0.4);
}

.academy-upgrade-btn {
    display: inline-block;
    background: #7a1f3d;
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.academy-upgrade-btn:hover {
    background: #9f294f;
    color: #fff;
}


/* ==========================================================================
   FORMS — SHARED
   ========================================================================== */

.academy-login-form,
.academy-register-form,
.academy-forgot-form,
.academy-reset-form {
    max-width: 420px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.academy-login-form input,
.academy-register-form input,
.academy-forgot-form input,
.academy-reset-form input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.academy-login-form button,
.academy-register-form button,
.academy-forgot-form button,
.academy-reset-form button {
    background: #7a1f3d;
    color: #fff;
    border: none;
    padding: 11px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.academy-login-form button:hover,
.academy-register-form button:hover,
.academy-forgot-form button:hover,
.academy-reset-form button:hover {
    background: #9f294f;
}

.academy-login-links {
    text-align: center;
}

.academy-forgot-link {
    font-size: 13px;
    color: #7a1f3d;
    text-decoration: none;
}

.academy-forgot-link:hover {
    text-decoration: underline;
}

.academy-error {
    color: #c62828;
    font-size: 14px;
    margin: 0;
}

.academy-notice {
    color: #2e7d32;
    font-size: 14px;
    margin: 0;
}


/* ==========================================================================
   ACCOUNT NAV (header widget)
   ========================================================================== */

.academy-account {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Logged out */
.academy-login-link {
    color: #cfd8dc;
    font-weight: 600;
    text-decoration: none;
    margin-right: 12px;
}

.academy-register-link {
    background: #7a1f3d;
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.academy-register-link:hover {
    background: #9f294f;
    color: #fff;
}

/* Logged in */
.academy-account.logged-in {
    position: relative;
    z-index: 9999;
}

.academy-account-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.academy-account-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
}

.academy-account-caret {
    font-size: 10px;
    opacity: 0.7;
}

/* Dropdown */
.academy-account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    padding: 10px;
    min-width: 200px;
    z-index: 10000;
    display: none;
}

.academy-account.open .academy-account-dropdown {
    display: block;
}

.academy-account-dropdown a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #1f2d2a;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.academy-account-dropdown a:hover {
    background: #f4f6f8;
}


/* ==========================================================================
   DASHBOARD SHELL
   ========================================================================== */

.academy-dashboard {
    max-width: 1100px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.academy-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.academy-card {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* Plan badge */
.academy-plan {
    display: flex;
    gap: 10px;
    align-items: center;
}

.plan-name {
    font-weight: 700;
}

.plan-status {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: capitalize;
}

.plan-status.active {
    background: #e6f4ea;
    color: #2e7d32;
}

.plan-status.inactive,
.plan-status.trial {
    background: #eeeeee;
    color: #555;
}


/* ==========================================================================
   MODULE ROWS
   ========================================================================== */

.academy-dashboard-modules {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.academy-module-row {
    display: grid;
    grid-template-columns: 1fr 1fr 80px;
    gap: 12px;
    align-items: center;
    padding: 12px 10px;
    border-radius: 10px;
    text-decoration: none !important;
    color: inherit;
    transition: background 0.15s ease, transform 0.15s ease;
}

.academy-module-row:hover {
    background: #f7f7f7;
    transform: translateY(-2px);
}

.academy-module-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.academy-module-title {
    font-weight: 600;
    font-size: 15px;
}

.academy-module-meta {
    font-size: 12px;
    color: #666;
}

.academy-module-progress-bar {
    height: 6px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.academy-module-progress-fill {
    height: 100%;
    background: #7a1f3d;
    border-radius: 10px;
    transition: width 0.4s ease;
}

.academy-module-progress-text {
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}


/* ==========================================================================
   MODULE STATUS COLORS
   ========================================================================== */

.academy-module-progress-text.not-started {
    color: #9e9e9e;
}

.academy-module-progress-text.in-progress {
    color: #f57c00;
}

.academy-module-progress-text.complete {
    color: #2e7d32;
}

.academy-module-row.complete {
    opacity: 0.85;
}


/* ==========================================================================
   BADGES
   ========================================================================== */

.preview-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 10px;
    background: #e6f4ea;
    color: #2e7d32;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    vertical-align: middle;
}

.locked-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    background: #444;
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    vertical-align: middle;
}

.academy-preview-note {
    background: #fff3cd;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}


/* ==========================================================================
   LOCKED / FREE POST CLASSES  (applied via post_class filter)
   ========================================================================== */

.academy-locked {
    position: relative;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.academy-locked:hover {
    opacity: 0.8;
}

.academy-locked::after {
    content: "🔒 Locked";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 14px;
    pointer-events: none;
    z-index: 10;
}

.academy-free {
    position: relative;
}

.academy-free::before {
    content: "Free";
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2e7d32;
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 14px;
    pointer-events: none;
}



/* ==========================================================================
   UPGRADE MODAL
   ========================================================================== */

.academy-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 12, 0.72);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.academy-modal.active {
    opacity: 1;
    pointer-events: all;
}

.academy-modal-content {
    background: #ffffff;
    border-radius: 24px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.academy-modal.active .academy-modal-content {
    transform: translateY(0) scale(1);
}

/* Top accent band — replaces the ::before emoji */
.academy-modal-content::before {
    content: "";
    display: block;
    height: 5px;
    background: linear-gradient(90deg, #7b1e3c, #c0392b, #e67e22);
}

.academy-modal-badge {
    display: inline-block;
    margin: 28px auto 0;
    background: #fef3f2;
    color: #c0392b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid #fbd5d0;
}

.academy-modal-icon {
    margin: 20px auto 0;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #7b1e3c, #c0392b);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(123, 30, 60, 0.35);
}

.academy-modal-icon svg {
    width: 26px;
    height: 26px;
}

.academy-modal-content h3 {
    font-size: 24px;
    font-weight: 800;
    color: #111;
    margin: 16px 40px 10px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.academy-modal-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 40px 24px;
}

.academy-modal-features {
    background: #f8faf8;
    border: 1px solid #e8f0e8;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 0 40px 28px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.academy-modal-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.academy-modal-feature-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: #2e7d32;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.academy-modal-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 40px 36px;
}

.academy-modal-actions .academy-button {
    width: 100%;
    text-align: center;
    padding: 15px 28px;
    font-size: 16px;
}

.academy-modal-close,
.academy-modal-close:hover,
.academy-modal-close:focus,
.academy-modal-close:active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 4px 0;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
    color: #333 !important;
}


/* ==========================================================================
   RESET PROGRESS CARD
   ========================================================================== */

.academy-reset-card {
    border: 1px solid #f5c2c7;
    background: #fff8f8;
}

.academy-reset-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.academy-reset-row p {
    font-size: 13px;
    color: #888;
    margin: 4px 0 0;
}

.academy-reset-btn {
    background: none;
    border: 1px solid #c0392b;
    color: #c0392b;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.academy-reset-btn:hover {
    background: #c0392b;
    color: #fff;
}

.academy-reset-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}