/**
 * Hoaa Membership — Frontend Styles
 * Clean, modern design for audio story membership system.
 */

/* ===========================
   CSS Custom Properties
   =========================== */
:root {
    --hoaa-primary: #92d100;
    --hoaa-primary-light: #a8e02a;
    --hoaa-primary-dark: #7ab800;
    --hoaa-primary-bg: #f3fae1;
    --hoaa-primary-text: #111111;
    --hoaa-success: #16a34a;
    --hoaa-success-bg: #f0fdf4;
    --hoaa-error: #dc2626;
    --hoaa-error-bg: #fef2f2;
    --hoaa-warning: #ea580c;
    --hoaa-text: #1a1a2e;
    --hoaa-text-light: #64748b;
    --hoaa-text-lighter: #94a3b8;
    --hoaa-bg: #ffffff;
    --hoaa-bg-subtle: #f8fafc;
    --hoaa-border: #e2e8f0;
    --hoaa-border-light: #f1f5f9;
    --hoaa-radius: 12px;
    --hoaa-radius-sm: 8px;
    --hoaa-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --hoaa-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --hoaa-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --hoaa-transition: 0.2s ease;
    --hoaa-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ===========================
   Reset & Base — Override dark theme inheritance
   =========================== */
.hoaa-auth-wrapper *,
.hoaa-dashboard *,
.hoaa-paywall *,
.hoaa-payment-overlay *,
.hoaa-login-required * {
    box-sizing: border-box;
}

/* Force dark text on dashboard/paywall (they have white backgrounds) */
.hoaa-dashboard,
.hoaa-dashboard *,
.hoaa-paywall,
.hoaa-paywall *,
.hoaa-payment-overlay .hoaa-payment-popup,
.hoaa-payment-overlay .hoaa-payment-popup * {
    color: #1a1a2e;
}

.hoaa-login-required {
    text-align: center;
    padding: 60px 20px;
}

.hoaa-login-required-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.hoaa-login-required h3 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0 0 8px;
}

.hoaa-login-required p {
    color: #aaaaaa !important;
    margin: 0 0 20px;
    font-size: 14px;
}

.hoaa-login-required .hoaa-auth-switch {
    margin-top: 16px;
}

.hoaa-login-required .hoaa-auth-switch a {
    color: var(--hoaa-primary) !important;
    font-weight: 600;
    text-decoration: none;
}

.hoaa-login-required .hoaa-auth-switch a:hover {
    text-decoration: underline;
}

/* Then re-apply specific colors where needed */
.hoaa-dashboard a { color: #1a1a2e; }
.hoaa-dashboard a:hover { color: var(--hoaa-primary-dark); }
.hoaa-dashboard .hoaa-dash-nav-item { color: #64748b; }
.hoaa-dashboard .hoaa-dash-nav-item.active { color: var(--hoaa-primary-dark); }
.hoaa-dashboard .hoaa-dash-nav-logout { color: var(--hoaa-error); }

/* ===========================
   Buttons
   =========================== */
.hoaa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: 2px solid transparent;
    border-radius: var(--hoaa-radius-sm);
    font-family: var(--hoaa-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--hoaa-transition);
    text-decoration: none;
    line-height: 1.5;
}

.hoaa-btn-primary {
    background: #92d100 !important;
    color: #111111 !important;
    border-color: #92d100 !important;
}
.hoaa-btn-primary:hover {
    background: #a8e02a !important;
    border-color: #a8e02a !important;
    color: #111111 !important;
    transform: translateY(-1px);
    box-shadow: var(--hoaa-shadow-md);
}

.hoaa-btn-outline {
    background: transparent;
    color: var(--hoaa-primary);
    border-color: var(--hoaa-primary);
}
.hoaa-btn-outline:hover {
    background: var(--hoaa-primary-bg);
}

.hoaa-btn-full {
    width: 100%;
}

.hoaa-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.hoaa-btn-sm {
    padding: 6px 14px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
}

/* Order actions (status + continue button) */
.hoaa-order-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

/* Spinner */
.hoaa-spinner {
    animation: hoaa-spin 0.8s linear infinite;
}
@keyframes hoaa-spin {
    to { transform: rotate(360deg); }
}

/* ===========================
   Auth Forms (Login / Register)
   =========================== */
.hoaa-auth-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 16px;
    font-family: var(--hoaa-font);
}

.hoaa-auth-card {
    width: 100% !important;
    max-width: 440px !important;
    background: #111111 !important;
    border-radius: var(--hoaa-radius) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #2a2a2a !important;
    overflow: hidden;
    color: #ffffff !important;
}

.hoaa-auth-header {
    text-align: center;
    padding: 28px 32px 8px;
}

.hoaa-auth-logo {
    margin-bottom: 12px;
}

.hoaa-auth-logo img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.hoaa-auth-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0 0 6px;
}

.hoaa-auth-header p {
    color: #aaaaaa !important;
    margin: 0;
    font-size: 14px;
}

.hoaa-auth-form {
    padding: 24px 32px;
}

.hoaa-auth-footer {
    text-align: center;
    padding: 16px 32px 28px;
    border-top: 1px solid #2a2a2a !important;
}

.hoaa-auth-footer p {
    margin: 0;
    font-size: 14px;
    color: #aaaaaa !important;
}

.hoaa-auth-footer a {
    color: var(--hoaa-primary) !important;
    font-weight: 600;
    text-decoration: none;
}
.hoaa-auth-footer a:hover {
    text-decoration: underline;
}

/* Google Login Button */
.hoaa-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 32px;
    margin: 4px 0 16px;
}

.hoaa-auth-divider::before,
.hoaa-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #333 !important;
}

.hoaa-auth-divider span {
    color: #888 !important;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hoaa-btn-google {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #dadce0 !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
    cursor: pointer;
    margin: 0 32px 20px;
    width: calc(100% - 64px) !important;
    box-sizing: border-box;
}

.hoaa-btn-google:hover {
    background: #f8f9fa !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px);
}

.hoaa-btn-google svg {
    flex-shrink: 0;
}

.hoaa-auth-message {
    text-align: center;
    padding: 16px 32px;
}

/* ===========================
   Form Elements
   =========================== */
.hoaa-form-group {
    margin-bottom: 12px;
}

.hoaa-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}

.hoaa-auth-card .hoaa-form-group label {
    color: #cccccc !important;
}

/* Hide SVG icons inside auth card inputs to prevent overlap */
.hoaa-auth-card .hoaa-input-icon svg {
    display: none !important;
}

.hoaa-auth-card .hoaa-input-icon input {
    padding-left: 14px !important;
}

.hoaa-input-icon {
    position: relative;
}

.hoaa-input-icon svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    width: 16px !important;
    height: 16px !important;
}

.hoaa-input-icon input {
    padding-left: 38px;
}

.hoaa-form-group input[type="text"],
.hoaa-form-group input[type="email"],
.hoaa-form-group input[type="password"],
.hoaa-dash-form input[type="text"],
.hoaa-dash-form input[type="email"],
.hoaa-dash-form input[type="password"] {
    width: 100%;
    padding: 8px 14px !important;
    border: 1.5px solid var(--hoaa-border);
    border-radius: var(--hoaa-radius-sm);
    font-size: 14px;
    font-family: var(--hoaa-font);
    color: var(--hoaa-text);
    background: var(--hoaa-bg);
    transition: border-color var(--hoaa-transition), box-shadow var(--hoaa-transition);
    outline: none;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.5 !important;
}

/* Dark inputs inside auth card */
.hoaa-auth-card .hoaa-form-group input[type="text"],
.hoaa-auth-card .hoaa-form-group input[type="email"],
.hoaa-auth-card .hoaa-form-group input[type="password"] {
    background: #1e1e1e !important;
    border-color: #333 !important;
    color: #ffffff !important;
    padding: 8px 14px !important;
    line-height: 1.5 !important;
}

.hoaa-auth-card .hoaa-form-group input::placeholder {
    color: #666 !important;
}

.hoaa-form-group input:focus,
.hoaa-dash-form input:focus {
    border-color: var(--hoaa-primary) !important;
    box-shadow: 0 0 0 3px rgba(146, 209, 0, 0.15) !important;
}

.hoaa-auth-card .hoaa-form-group input:focus {
    border-color: var(--hoaa-primary) !important;
    background: #252525 !important;
}

.hoaa-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}

.hoaa-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--hoaa-text-light);
}

.hoaa-auth-card .hoaa-checkbox,
.hoaa-auth-card .hoaa-forgot-link {
    color: #aaaaaa;
}

.hoaa-checkbox input[type="checkbox"] {
    accent-color: var(--hoaa-primary);
}

.hoaa-forgot-link {
    color: var(--hoaa-primary);
    text-decoration: none;
    font-size: 13px;
}
.hoaa-forgot-link:hover {
    text-decoration: underline;
}

/* Form Messages */
.hoaa-form-message {
    padding: 0;
    margin: 0 0 12px;
    font-size: 13px;
    border-radius: var(--hoaa-radius-sm);
    transition: all var(--hoaa-transition);
}
.hoaa-form-message:empty {
    display: none;
}
.hoaa-form-message.success {
    background: var(--hoaa-success-bg);
    color: var(--hoaa-success);
    padding: 10px 14px;
    border: 1px solid #bbf7d0;
}
.hoaa-form-message.error {
    background: var(--hoaa-error-bg);
    color: var(--hoaa-error);
    padding: 10px 14px;
    border: 1px solid #fecaca;
}

/* Password Strength */
.hoaa-password-strength {
    height: 3px;
    border-radius: 2px;
    margin-top: 6px;
    transition: all var(--hoaa-transition);
}
.hoaa-password-strength.weak { background: var(--hoaa-error); width: 33%; }
.hoaa-password-strength.medium { background: var(--hoaa-warning); width: 66%; }
.hoaa-password-strength.strong { background: var(--hoaa-success); width: 100%; }

/* ===========================
   Dashboard
   =========================== */
.hoaa-dashboard {
    display: flex;
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
    font-family: var(--hoaa-font);
}

/* Sidebar */
.hoaa-dash-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.hoaa-dash-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    background: #ffffff !important;
    border-radius: var(--hoaa-radius);
    border: 1px solid var(--hoaa-border-light);
    margin-bottom: 12px;
    color: #1a1a2e !important;
    text-align: center;
}

.hoaa-dash-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.hoaa-dash-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.hoaa-dash-user-info strong {
    font-size: 15px;
    color: #1a1a2e !important;
    word-break: break-word;
    line-height: 1.3;
}

/* Avatar Hover Overlay */
.hoaa-dash-avatar {
    position: relative;
}

.hoaa-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.hoaa-dash-avatar:hover .hoaa-avatar-overlay {
    opacity: 1;
}

/* Avatar Upload in Profile */
.hoaa-avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hoaa-border-light);
}

.hoaa-avatar-preview {
    flex-shrink: 0;
}

.hoaa-avatar-preview img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--hoaa-border);
}

.hoaa-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hoaa-avatar-hint {
    font-size: 12px;
    color: var(--hoaa-text-lighter) !important;
    margin: 0;
}

/* Nav */
.hoaa-dash-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #ffffff !important;
    border-radius: var(--hoaa-radius);
    border: 1px solid var(--hoaa-border-light);
    padding: 8px;
}

.hoaa-dash-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--hoaa-radius-sm);
    color: var(--hoaa-text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--hoaa-transition);
}

.hoaa-dash-nav-item:hover {
    background: var(--hoaa-bg-subtle);
    color: var(--hoaa-text);
}

.hoaa-dash-nav-item.active {
    background: var(--hoaa-primary-bg);
    color: var(--hoaa-primary);
    font-weight: 600;
}

.hoaa-dash-nav-item svg {
    flex-shrink: 0;
}

.hoaa-dash-nav-logout {
    margin-top: 8px;
    border-top: 1px solid var(--hoaa-border-light);
    padding-top: 12px;
    color: var(--hoaa-error);
}
.hoaa-dash-nav-logout:hover {
    background: var(--hoaa-error-bg);
    color: var(--hoaa-error);
}

.hoaa-dash-badge {
    margin-left: auto;
    background: var(--hoaa-primary);
    color: #111 !important;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

/* Content */
.hoaa-dash-content {
    flex: 1;
    min-width: 0;
}

.hoaa-dash-tab {
    display: none;
}
.hoaa-dash-tab.active {
    display: block;
}

.hoaa-dash-section {
    background: #ffffff !important;
    border-radius: var(--hoaa-radius);
    border: 1px solid var(--hoaa-border-light);
    padding: 28px;
    color: #1a1a2e !important;
}

.hoaa-dash-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e !important;
    margin: 0 0 20px;
}

.hoaa-dash-form {
    max-width: 400px;
}

/* ===========================
   Membership Card
   =========================== */
.hoaa-membership-card {
    padding: 20px;
    border-radius: var(--hoaa-radius);
    border: 1.5px solid;
    color: #1a1a2e !important;
}

.hoaa-membership-card p,
.hoaa-membership-card strong {
    color: #1a1a2e !important;
}

.hoaa-membership-active {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.hoaa-membership-expired {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.hoaa-membership-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    color: #1a1a2e !important;
}

.hoaa-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.hoaa-status-dot.active {
    background: var(--hoaa-success);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}
.hoaa-status-dot.expired {
    background: var(--hoaa-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.hoaa-membership-info {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
}

.hoaa-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hoaa-info-label {
    font-size: 12px;
    color: var(--hoaa-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hoaa-info-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--hoaa-text);
}

/* Progress Bar */
.hoaa-progress-bar {
    height: 6px;
    background: rgba(0,0,0,0.08);
    border-radius: 3px;
    overflow: hidden;
}

.hoaa-progress-fill {
    height: 100%;
    background: var(--hoaa-success);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ===========================
   Plans
   =========================== */
.hoaa-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.hoaa-plan-card {
    position: relative;
    padding: 24px 16px;
    text-align: center;
    border: 1.5px solid var(--hoaa-border);
    border-radius: var(--hoaa-radius);
    background: #ffffff !important;
    transition: all var(--hoaa-transition);
    color: #1a1a2e !important;
}

.hoaa-plan-card:hover {
    border-color: var(--hoaa-primary-light);
    box-shadow: var(--hoaa-shadow-md);
    transform: translateY(-2px);
}

.hoaa-plan-popular {
    border-color: var(--hoaa-primary);
    background: var(--hoaa-primary-bg);
}

.hoaa-plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--hoaa-primary);
    color: #111 !important;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 10px;
    white-space: nowrap;
}

.hoaa-plan-duration {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e !important;
    margin-bottom: 8px;
}

.hoaa-plan-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--hoaa-primary-dark) !important;
    margin-bottom: 4px;
}

.hoaa-plan-permonth {
    font-size: 12px;
    color: #64748b !important;
    margin-bottom: 16px;
    min-height: 18px;
}

/* ===========================
   Favorites List
   =========================== */
.hoaa-favorites-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hoaa-favorite-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--hoaa-radius-sm);
    border: 1px solid var(--hoaa-border-light);
    transition: all var(--hoaa-transition);
}

.hoaa-favorite-item:hover {
    background: var(--hoaa-bg-subtle);
}

.hoaa-favorite-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--hoaa-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--hoaa-bg-subtle);
}

.hoaa-favorite-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hoaa-favorite-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.hoaa-favorite-info {
    flex: 1;
    min-width: 0;
}

.hoaa-favorite-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hoaa-text);
    text-decoration: none;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hoaa-favorite-title:hover {
    color: var(--hoaa-primary);
}

.hoaa-favorite-date {
    font-size: 12px;
    color: var(--hoaa-text-lighter);
}

.hoaa-favorite-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--hoaa-error);
    opacity: 0.5;
    padding: 4px;
    transition: opacity var(--hoaa-transition);
}
.hoaa-favorite-remove:hover {
    opacity: 1;
}

/* ===========================
   Orders List
   =========================== */
.hoaa-orders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hoaa-order-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: var(--hoaa-radius-sm);
    border: 1px solid var(--hoaa-border-light);
}

.hoaa-order-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.hoaa-order-info {
    flex: 1;
    min-width: 0;
}

.hoaa-order-code {
    font-size: 14px;
    font-weight: 600;
    color: var(--hoaa-text);
}

.hoaa-order-detail {
    font-size: 13px;
    color: var(--hoaa-text-light);
    margin-top: 2px;
}

.hoaa-order-date {
    font-size: 12px;
    color: var(--hoaa-text-lighter);
    margin-top: 2px;
}

.hoaa-order-status {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 10px;
}

.hoaa-order-status-completed {
    background: var(--hoaa-success-bg);
    color: var(--hoaa-success);
}
.hoaa-order-status-pending {
    background: #fff7ed;
    color: var(--hoaa-warning);
}
.hoaa-order-status-expired,
.hoaa-order-status-cancelled {
    background: var(--hoaa-bg-subtle);
    color: var(--hoaa-text-lighter);
}

/* ===========================
   Empty State
   =========================== */
.hoaa-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.hoaa-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.hoaa-empty-state p {
    color: var(--hoaa-text-light);
    margin-bottom: 16px;
}

/* ===========================
   Favorite Button (on story page)
   =========================== */
.hoaa-fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid var(--hoaa-border);
    border-radius: 20px;
    background: var(--hoaa-bg);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--hoaa-text-light);
    transition: all var(--hoaa-transition);
    font-family: var(--hoaa-font);
}

.hoaa-fav-btn:hover {
    border-color: #fca5a5;
    color: #ef4444;
}

.hoaa-fav-btn.active {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #ef4444;
}

.hoaa-fav-btn .hoaa-heart-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 2px;
    transition: all var(--hoaa-transition);
}

.hoaa-fav-btn.active .hoaa-heart-icon {
    fill: currentColor;
    stroke: none;
}



/* ===========================
   Badges
   =========================== */
.hoaa-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.hoaa-badge-active {
    background: var(--hoaa-success-bg);
    color: var(--hoaa-success);
    border: 1px solid #bbf7d0;
}

.hoaa-badge-expired {
    background: var(--hoaa-error-bg);
    color: var(--hoaa-error);
    border: 1px solid #fecaca;
}

/* ===========================
   Payment Popup
   =========================== */
.hoaa-payment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: var(--hoaa-font);
}

.hoaa-payment-popup {
    background: var(--hoaa-bg);
    border-radius: var(--hoaa-radius);
    box-shadow: var(--hoaa-shadow-lg);
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: hoaa-popup-in 0.3s ease;
}

@keyframes hoaa-popup-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hoaa-payment-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--hoaa-text-light);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
}
.hoaa-payment-close:hover {
    background: var(--hoaa-bg-subtle);
    color: var(--hoaa-text);
}

.hoaa-payment-header {
    padding: 20px 24px 0;
}

.hoaa-payment-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--hoaa-text);
}

.hoaa-payment-body {
    padding: 16px 24px 24px;
}

.hoaa-payment-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}

.hoaa-payment-label {
    color: var(--hoaa-text-light);
}

.hoaa-payment-divider {
    height: 1px;
    background: var(--hoaa-border-light);
    margin: 16px 0;
}

.hoaa-payment-bank {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hoaa-payment-field {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.hoaa-payment-field .hoaa-payment-label {
    min-width: 80px;
    flex-shrink: 0;
}

.hoaa-payment-highlight {
    color: var(--hoaa-primary);
    font-size: 16px;
}

.hoaa-copy-btn {
    background: none;
    border: 1px solid var(--hoaa-border);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 14px;
    transition: all var(--hoaa-transition);
}
.hoaa-copy-btn:hover {
    background: var(--hoaa-bg-subtle);
}

.hoaa-payment-qr {
    text-align: center;
    margin-top: 8px;
}

.hoaa-payment-qr p {
    font-size: 13px;
    color: var(--hoaa-text-light);
    margin-bottom: 12px;
}

.hoaa-qr-image {
    max-width: 200px;
    border-radius: var(--hoaa-radius-sm);
    border: 1px solid var(--hoaa-border-light);
}

.hoaa-payment-waiting {
    text-align: center;
    padding: 16px 0;
}

.hoaa-payment-waiting-icon {
    color: var(--hoaa-primary);
    margin-bottom: 8px;
}

.hoaa-payment-waiting p {
    font-size: 14px;
    font-weight: 600;
    color: var(--hoaa-text);
    margin-bottom: 4px;
}

.hoaa-payment-waiting small {
    font-size: 12px;
    color: var(--hoaa-text-lighter);
}

.hoaa-payment-success {
    text-align: center;
    padding: 16px 0;
}

.hoaa-payment-success-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.hoaa-payment-success h3 {
    color: var(--hoaa-success);
    font-size: 18px;
    margin: 0 0 4px;
}

.hoaa-payment-success p {
    color: var(--hoaa-text-light);
    font-size: 14px;
}

/* Login Required */
.hoaa-login-required {
    text-align: center;
    padding: 48px 24px;
    font-family: var(--hoaa-font);
}

.hoaa-login-required-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.hoaa-login-required h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--hoaa-text);
    margin-bottom: 8px;
}

.hoaa-login-required p {
    color: var(--hoaa-text-light);
    margin-bottom: 16px;
}

.hoaa-auth-switch {
    margin-top: 12px !important;
    font-size: 13px;
}

.hoaa-auth-switch a {
    color: var(--hoaa-primary);
    text-decoration: none;
    font-weight: 600;
}

/* ===========================
   Toast Notification
   =========================== */
.hoaa-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: var(--hoaa-radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--hoaa-font);
    z-index: 100000;
    box-shadow: var(--hoaa-shadow-lg);
    animation: hoaa-toast-in 0.3s ease;
    max-width: 360px;
}

.hoaa-toast.success {
    background: var(--hoaa-success);
    color: #fff;
}
.hoaa-toast.error {
    background: var(--hoaa-error);
    color: #fff;
}
.hoaa-toast.info {
    background: var(--hoaa-text);
    color: #fff;
}

@keyframes hoaa-toast-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes hoaa-toast-out {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* ===========================
   Payment Popup
   =========================== */
.hoaa-payment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hoaa-payment-popup {
    background: #ffffff !important;
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    color: #1a1a2e !important;
}

.hoaa-payment-popup * {
    color: #1a1a2e !important;
}

.hoaa-payment-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8 !important;
    line-height: 1;
    z-index: 1;
}

.hoaa-payment-close:hover {
    color: #1a1a2e !important;
}

.hoaa-payment-header {
    padding: 24px 28px 0;
}

.hoaa-payment-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.hoaa-payment-body {
    padding: 20px 28px 28px;
}

.hoaa-payment-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hoaa-payment-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.hoaa-payment-amount strong {
    font-size: 18px;
    color: var(--hoaa-primary-dark) !important;
}

.hoaa-payment-label {
    color: #64748b !important;
    font-size: 14px;
}

.hoaa-payment-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 16px 0;
}

/* Two-column: bank info left, QR right */
.hoaa-payment-columns {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.hoaa-payment-left {
    flex: 1;
    min-width: 0;
}

.hoaa-payment-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hoaa-payment-right .hoaa-qr-image {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    height: auto !important;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.hoaa-payment-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.hoaa-payment-field:last-child {
    border-bottom: none;
}

.hoaa-payment-field strong {
    font-weight: 700;
    color: #1a1a2e !important;
}

.hoaa-payment-highlight {
    color: var(--hoaa-primary-dark) !important;
    font-size: 15px;
}

.hoaa-copy-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.hoaa-copy-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Waiting + Success */
.hoaa-payment-waiting,
.hoaa-payment-success {
    text-align: center;
    padding: 16px 0;
}

.hoaa-payment-waiting-icon {
    margin-bottom: 12px;
    color: var(--hoaa-primary) !important;
}

.hoaa-payment-waiting p {
    font-weight: 600;
    margin: 0 0 4px;
}

.hoaa-payment-waiting small {
    color: #64748b !important;
    font-size: 13px;
}

.hoaa-payment-success-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.hoaa-payment-success h3 {
    color: var(--hoaa-success) !important;
    margin: 0 0 4px;
}

/* Mobile: stack columns */
@media (max-width: 600px) {
    .hoaa-payment-columns {
        flex-direction: column;
        align-items: center;
    }

    .hoaa-payment-left {
        width: 100%;
    }

    .hoaa-payment-right {
        width: 100%;
        justify-content: center;
    }

    .hoaa-payment-right .hoaa-qr-image {
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
    }

    .hoaa-payment-popup {
        max-width: 100%;
    }

    .hoaa-payment-body {
        padding: 16px 20px 20px;
    }
}

/* ===========================
   Admin Styles
   =========================== */
.hoaa-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.hoaa-admin-stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.hoaa-admin-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.2;
}

.hoaa-admin-stat-label {
    font-size: 13px;
    color: #646970;
    margin-top: 4px;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .hoaa-dashboard {
        flex-direction: column;
        gap: 16px;
    }

    .hoaa-dash-sidebar {
        width: 100%;
    }

    .hoaa-dash-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    .hoaa-dash-nav-item {
        flex: 1;
        min-width: calc(50% - 4px);
        font-size: 13px;
        padding: 8px 10px;
        justify-content: center;
    }

    .hoaa-dash-nav-item svg {
        display: none;
    }

    .hoaa-dash-nav-logout {
        margin-top: 0;
        border-top: none;
        padding-top: 8px;
    }

    .hoaa-dash-section {
        padding: 20px 16px;
    }

    .hoaa-plans {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hoaa-membership-info {
        flex-direction: column;
        gap: 8px;
    }

    .hoaa-auth-form {
        padding: 20px;
    }

    .hoaa-auth-header {
        padding: 24px 20px 8px;
    }

    .hoaa-auth-footer {
        padding: 16px 20px 24px;
    }

    .hoaa-paywall-plans {
        flex-direction: column;
        align-items: center;
    }

    .hoaa-payment-popup {
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .hoaa-dash-nav-item {
        min-width: 100%;
    }
}

/* ===========================
   Audio Player Customizations
   =========================== */

/* Đổi icon loa (âm thanh) thành ảnh SVG do người dùng yêu cầu */
.brxe-audio .media-controls .button-volume,
.brxe-audio .volume-button,
.brxe-audio svg.volume-icon,
.bricks-audio-player svg.volume-icon,
.mejs-volume-button button {
    background-image: url('https://motnhanhhoaa.com/wp-content/uploads/2026/04/sound_max_fill-1.svg') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

/* Ẩn SVG mặc định của phần loa nếu có */
.brxe-audio .media-controls .button-volume svg,
.brxe-audio .volume-button svg,
.brxe-audio .volume-icon,
.bricks-audio-volume svg {
    display: none !important;
}

/* Đổi màu thanh % âm thanh (active) thành xám */
/* Dành cho thẻ input dạng range của Bricks/MediaElement */
.brxe-audio input[type="range"]::-webkit-slider-runnable-track {
    background: #555555;
}

.brxe-audio .range-track-filled,
.bricks-audio-player .range-track-filled,
.brxe-audio input[type="range"]::-moz-range-progress,
.mejs-time-current,
.mejs-volume-current {
    background: #9ca3af !important; /* Màu xám cho % active */
}

/* Biến CSS Native cho Bricks Audio */
.brxe-audio {
    --track-fill: #9ca3af !important;
    --volume-track-fill: #9ca3af !important;
}
