/**
 * Maxxis Rewards - Frontend Styles
 * Clean, light theme inspired by modern admin dashboards
 */

/* Reset & Base */
.maxxis-rewards-portal * {
    box-sizing: border-box;
}

.maxxis-rewards-portal {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #fff;
    min-height: 100vh;
    position: fixed;
    top: 32px; /* Account for WordPress admin bar */
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    overflow: auto;
}

/* When admin bar is not present (logged out users) */
body:not(.admin-bar) .maxxis-rewards-portal {
    top: 0;
}

/* Portal Layout */
.maxxis-portal-header {
    background: #fff;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    border-bottom: 1px solid #e6e6e6;
    position: fixed;
    top: 32px; /* Account for WordPress admin bar */
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

/* When admin bar is not present */
body:not(.admin-bar) .maxxis-portal-header {
    top: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.header-logo-text {
    color: #FF5400;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    margin: 5px 0;
    transition: 0.3s;
}

.header-center {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.header-search {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    padding-top: 10px;
    /* gap: 15px; */
}

.header-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
    border-radius: 50%;
    text-decoration: none;
    font-size: 16px;
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #FF5400;
    border-radius: 50%;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
}

.user-menu-btn:hover {
    background: #f4f6f9;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FF5400, #ff8c42);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    min-width: 180px;
    display: none;
    z-index: 200;
    overflow: hidden;
}

.user-menu-dropdown.active {
    display: block;
}

.user-menu-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.user-menu-dropdown a:hover {
    background: #f4f6f9;
}

.user-menu-dropdown .divider {
    height: 1px;
    background: #e6e6e6;
    margin: 5px 0;
}

/* Sidebar Navigation */
.maxxis-portal-nav {
    position: fixed;
    top: 102px; /* 70px header + 32px admin bar */
    left: 0;
    width: 240px;
    height: calc(100vh - 102px);
    background: #fff;
    border-right: 1px solid #e6e6e6;
    overflow-y: auto;
    z-index: 99;
    padding: 20px 0;
}

/* When admin bar is not present */
body:not(.admin-bar) .maxxis-portal-nav {
    top: 70px;
    height: calc(100vh - 70px);
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    padding: 10px 20px;
    letter-spacing: 0.5px;
}

.maxxis-nav-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.maxxis-nav-tabs li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.maxxis-nav-tabs li a:hover {
    background: #f4f6f9;
    color: #333;
}

.maxxis-nav-tabs li a.active {
    background: #fff5f0;
    color: #FF5400;
    border-left-color: #FF5400;
}

.nav-icon {
    width: 24px;
    margin-right: 10px;
    font-size: 16px;
    filter: grayscale(100%);
    opacity: 0.7;
}

.nav-text {
    flex: 1;
}

.nav-badge {
    background: #FF5400;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Main Content */
.maxxis-portal-content {
    margin-left: 240px;
    margin-top: 70px;
    padding: 25px 25px 75px 25px;
    min-height: calc(100vh - 70px);
    background: #f4f4f4;
}

/* Mobile Navigation */
.maxxis-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 98;
}

.maxxis-mobile-overlay.active {
    display: block;
}

.maxxis-portal-mobile-nav {
    display: none;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: #000;
    margin: 0;
}

.section-link {
    color: #FF5400;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.section-link:hover {
    text-decoration: underline;
}

/* Buttons */
.maxxis-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.maxxis-btn-primary {
    background: #FF5400;
    color: #fff;
}

.maxxis-btn-primary:hover {
    background: #e64a00;
    color: #fff;
}

.maxxis-btn-secondary {
    background: #f4f6f9;
    color: #333;
}

.maxxis-btn-secondary:hover {
    background: #e6e9ed;
}

.maxxis-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.maxxis-btn-block {
    display: block;
    width: 100%;
}

.maxxis-btn-disabled {
    background: #e6e9ed;
    color: #999;
    cursor: not-allowed;
}

/* Forms */
.maxxis-form-group {
    margin-bottom: 12px;
}

.maxxis-form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    font-size: 16px;
}

.maxxis-form-group input,
.maxxis-form-group select,
.maxxis-form-group textarea {
    /* width: 100%; */
	height: auto;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.maxxis-form-group input:focus,
.maxxis-form-group select:focus,
.maxxis-form-group textarea:focus {
    outline: none;
    border-color: #FF5400;
    box-shadow: 0 0 0 2px rgba(255, 84, 0, 0.1);
}

.maxxis-form-group small {
    display: block;
    margin-top: 2px;
    font-size: 16px;
    color: #999;
}

.maxxis-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
}

/* Available: Green */
.status-badge.available {
    background: #28a745;
    color: #fff;
}

/* Pending: Orange */
.status-badge.pending {
    background: #0d1f51;
    color: #fff;
}

/* Approved/Redeemed: Black */
.status-badge.approved,
.status-badge.redeemed {
    background: #28a745;
    color: #fff;
}

/* Expired: Red */
.status-badge.expired {
    background: #dc3545;
    color: #fff;
}

/* Points Badge */
.points-badge {
    display: inline-block;
    background: #FF5400;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
}

/* Messages */
.maxxis-message {
    margin-bottom: 16px;
}

.maxxis-message.success,
.maxxis-message .success {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.maxxis-message.error,
.maxxis-message .error {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.maxxis-message.info,
.maxxis-message .info {
    background: #17a2b8;
    color: #fff;
    border: none;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

/* Modal */
.maxxis-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.maxxis-modal-content {
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.maxxis-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e6e6e6;
}

.maxxis-modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.maxxis-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.maxxis-modal-close:hover {
    color: #333;
}

.maxxis-modal-body {
    padding: 20px;
}

.maxxis-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e6e6e6;
    text-align: right;
}

/* Auth Pages */
.maxxis-auth-wrapper {
    min-height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 20px;
}

.maxxis-auth-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.maxxis-auth-logo {
    background: linear-gradient(135deg, #FF5400, #ff8c42);
    color: #fff;
    padding: 20px 30px;
    text-align: center;
}

.maxxis-auth-logo h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.maxxis-auth-logo p {
    margin: 8px 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.auth-logo-img {
    max-height: 50px;
    width: auto;
    margin-bottom: 8px;
}

.maxxis-auth-form-container {
    padding: 20px 25px;
}

.maxxis-auth-form-container h2 {
    margin: 0 0 15px;
    font-size: 18px;
    color: #333;
}

.maxxis-auth-links {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e6e6e6;
}

.maxxis-auth-links a {
    color: #FF5400;
    text-decoration: none;
    font-size: 13px;
}

.maxxis-auth-links a:hover {
    text-decoration: underline;
}

.maxxis-auth-links .separator {
    margin: 0 10px;
    color: #ccc;
}

.maxxis-auth-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

.maxxis-auth-footer a {
    color: #FF5400;
    text-decoration: none;
    font-weight: 500;
}

/* Registration Multi-Step Styles */
.maxxis-registration-container {
    width: 100%;
    max-width: 550px;
}

.maxxis-registration-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.maxxis-registration-progress {
    background: #fff;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e6e6e6;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.progress-step .step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e6e6e6;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background: #FF5400;
    color: #fff;
}

.progress-step .step-label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: #FF5400;
}

.progress-bar {
    height: 4px;
    background: #e6e6e6;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF5400, #ff8c42);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Form Steps */
.maxxis-multistep-form .form-step {
    display: none;
    padding: 20px 25px;
}

.maxxis-multistep-form .form-step.active {
    display: block;
}

.form-step h2 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.form-step .step-description {
    color: #666;
    font-size: 16px;
    margin: -8px 0 15px;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e6e6e6;
}

.form-navigation .maxxis-btn {
    flex: 1;
}

/* Rider Entry */
.rider-entry {
    background: #f8f9fa;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
}

.rider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rider-header h3 {
    margin: 0;
    font-size: 16px;
    color: #FF5400;
    font-weight: 600;
}

.remove-rider-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 13px;
    padding: 5px 10px;
}

.remove-rider-btn:hover {
    text-decoration: underline;
}

/* Review Sections */
.review-section {
    background: #f8f9fa;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 10px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.edit-btn {
    background: none;
    border: 1px solid #FF5400;
    color: #FF5400;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-btn:hover {
    background: #FF5400;
    color: #fff;
}

.review-content {
    font-size: 16px;
    color: #555;
}

.review-content p {
    margin: 3px 0;
}

.review-rider {
    padding: 6px 0;
    border-bottom: 1px solid #e6e6e6;
}

.review-rider:last-child {
    border-bottom: none;
}

/* Checkbox Group */
.maxxis-checkbox-group {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: #FF5400;
}

.checkbox-label a {
    color: #FF5400;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

#addRiderBtn {
    margin: 15px 0 0;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 991px) {
    .maxxis-portal-nav {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .maxxis-portal-nav.mobile-open {
        transform: translateX(0);
        padding-bottom: 120px;
    }
    
    .maxxis-portal-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-center,
    .header-actions {
        display: none;
    }
}

@media (max-width: 767px) {
    .maxxis-portal-nav {
        height: calc(100vh - 70px - 60px);
        padding-bottom: 120px;
    }
    
    body.admin-bar .maxxis-portal-nav {
        height: calc(100vh - 102px - 60px);
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .user-menu-arrow {
        display: none;
    }
    
    .user-menu-btn {
        gap: 5px;
        padding: 5px;
    }
    
    .header-left {
        flex: 1;
        justify-content: flex-start;
    }
    
    .header-right {
        flex-shrink: 0;
    }
    
    .header-logo {
        font-size: 18px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .maxxis-portal-header {
        position: fixed;
    }
    
    .maxxis-portal-mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e6e6e6;
        z-index: 100;
        padding: 8px 0;
    }
    
    .maxxis-portal-mobile-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px;
        font-size: 11px;
        color: #666;
        text-decoration: none;
    }
    
    .maxxis-portal-mobile-nav a.active {
        color: #FF5400;
    }
    
    .maxxis-portal-mobile-nav .nav-icon {
        font-size: 20px;
        margin: 0 0 4px 0;
        width: auto;
    }
    
    .maxxis-portal-content {
        padding: 15px;
        padding-bottom: 120px;
    }
    
    .maxxis-form-row {
        grid-template-columns: 1fr;
    }
    
    .user-name {
        display: none;
    }
}

/* =============================================
   WELCOME POPUP STYLES - Style 3A: Light Grey
   ============================================= */

.maxxis-welcome-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.maxxis-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.maxxis-popup-box {
    position: relative;
    background: #f5f5f7;
    border-radius: 16px;
    padding: 40px 35px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    border: 1px solid #e0e0e0;
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.maxxis-popup-box h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.maxxis-popup-box p {
    margin: 0 0 28px 0;
    font-size: 15px;
    line-height: 1.7;
    color: #666;
}

.maxxis-popup-continue {
    background: #FF5400;
    color: #fff;
    border: none;
    padding: 14px 50px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.maxxis-popup-continue:hover {
    background: #e64a00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 84, 0, 0.35);
}

@media (max-width: 480px) {
    .maxxis-popup-box {
        padding: 30px 25px;
        margin: 0 15px;
    }
    
    .maxxis-popup-box h3 {
        font-size: 20px;
    }
    
    .maxxis-popup-box p {
        font-size: 14px;
    }
    
    .maxxis-popup-continue {
        padding: 12px 40px;
        font-size: 14px;
    }
}
