/**
 * EZYCR Customer Portal Styles
 * @since 5.31
 */

/* ================================
   AUTH WRAPPER & CARDS
   ================================ */
.ezycr-auth-wrapper {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
}

.ezycr-auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ezycr-auth-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
}

.ezycr-auth-tab {
    flex: 1;
    padding: 18px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
}

.ezycr-auth-tab.active {
    color: #2563eb;
    border-bottom: 3px solid #2563eb;
}

.ezycr-auth-form {
    padding: 30px;
}

.ezycr-auth-form h2 {
    margin: 0 0 5px;
    font-size: 24px;
    color: #1e293b;
}

.ezycr-auth-form > p {
    margin: 0 0 25px;
    color: #64748b;
}

.ezycr-auth-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    display: none;
}

.ezycr-auth-message.error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
}

.ezycr-auth-message.success {
    display: block;
    background: #f0fdf4;
    color: #16a34a;
}

.ezycr-form-options {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ezycr-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ezycr-welcome-bonus {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #fef3c7;
    border-radius: 8px;
    color: #92400e;
}

.ezycr-guest-option {
    text-align: center;
    margin-top: 20px;
    color: #64748b;
}

.ezycr-back-link {
    color: #2563eb;
    text-decoration: none;
}

/* ================================
   PORTAL LAYOUT
   ================================ */
.ezycr-portal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ezycr-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 16px;
    color: white;
    margin-bottom: 20px;
}

.ezycr-portal-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ezycr-portal-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
}

.ezycr-portal-user-info h2 {
    margin: 0;
    font-size: 22px;
}

.ezycr-loyalty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-top: 5px;
}

.ezycr-tier-bronze { background: #cd7f32; color: white; }
.ezycr-tier-silver { background: #c0c0c0; color: #333; }
.ezycr-tier-gold { background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%); color: #333; }
.ezycr-tier-platinum { background: linear-gradient(135deg, #e5e4e2 0%, #a8a8a8 100%); color: #333; }

/* Portal Navigation */
.ezycr-portal-nav {
    display: flex;
    gap: 5px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.ezycr-portal-nav a {
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.ezycr-portal-nav a:hover {
    background: #f1f5f9;
}

.ezycr-portal-nav a.active {
    background: #2563eb;
    color: white;
}

/* Portal Content */
.ezycr-portal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ================================
   STATS CARDS
   ================================ */
.ezycr-portal-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.ezycr-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.ezycr-stat-icon {
    font-size: 32px;
}

.ezycr-stat-card h4 {
    margin: 0;
    font-size: 24px;
    color: #1e293b;
}

.ezycr-stat-card p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* ================================
   SECTIONS
   ================================ */
.ezycr-portal-section {
    margin-bottom: 30px;
}

.ezycr-portal-section h3 {
    margin: 0 0 15px;
    font-size: 18px;
    color: #1e293b;
}

/* Quick Actions */
.ezycr-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.ezycr-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s;
}

.ezycr-action-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.ezycr-action-btn span:first-child {
    font-size: 32px;
}

/* ================================
   BOOKINGS
   ================================ */
.ezycr-bookings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.ezycr-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.ezycr-tab:hover {
    background: #f1f5f9;
}

.ezycr-tab.active {
    background: #2563eb;
    color: white;
}

.ezycr-booking-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.ezycr-booking-active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.ezycr-booking-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.ezycr-booking-card-header h4 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
}

.ezycr-booking-id {
    font-size: 13px;
    color: #64748b;
}

.ezycr-booking-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.ezycr-booking-dates {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.ezycr-booking-dates > div {
    display: flex;
    flex-direction: column;
}

.ezycr-booking-dates .ezycr-label {
    font-size: 12px;
    color: #64748b;
}

.ezycr-booking-dates .ezycr-value {
    font-weight: 600;
    color: #1e293b;
}

.ezycr-booking-dates .ezycr-time {
    font-size: 13px;
    color: #64748b;
}

.ezycr-booking-dates .ezycr-arrow {
    font-size: 20px;
    color: #94a3b8;
}

.ezycr-booking-total {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.ezycr-booking-card-footer {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.ezycr-empty-state {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

/* ================================
   BOOKING DETAIL
   ================================ */
.ezycr-booking-detail {
    max-width: 800px;
}

.ezycr-booking-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.ezycr-booking-detail-header h2 {
    margin: 0 0 5px;
}

.ezycr-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.ezycr-detail-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
}

.ezycr-detail-section h3 {
    margin: 0 0 15px;
    font-size: 16px;
}

.ezycr-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.ezycr-detail-row span {
    color: #64748b;
}

/* Trip Photos */
.ezycr-trip-photos-section {
    margin: 30px 0;
}

.ezycr-photos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ezycr-photo-category {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
}

.ezycr-photo-category h4 {
    margin: 0 0 15px;
    font-size: 15px;
    color: #374151;
}

.ezycr-photos-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ezycr-photos-list img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.ezycr-no-photos {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 10px;
}

/* ================================
   PROFILE FORM
   ================================ */
.ezycr-form {
    max-width: 800px;
}

.ezycr-form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.ezycr-form-section:last-of-type {
    border-bottom: none;
}

.ezycr-form-section h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #1e293b;
}

.ezycr-form-note {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 15px;
}

.ezycr-form-group {
    margin-bottom: 20px;
}

.ezycr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.ezycr-form-group input,
.ezycr-form-group select,
.ezycr-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.ezycr-form-group input:focus,
.ezycr-form-group select:focus,
.ezycr-form-group textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ezycr-form-group input:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

.ezycr-form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #94a3b8;
}

.ezycr-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ezycr-form-row.ezycr-form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ezycr-form-actions {
    margin-top: 30px;
}

/* ================================
   REWARDS
   ================================ */
.ezycr-rewards {
    max-width: 800px;
}

.ezycr-rewards-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 16px;
    color: white;
    margin-bottom: 30px;
}

.ezycr-tier-badge {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ezycr-tier-icon {
    font-size: 48px;
}

.ezycr-tier-name {
    font-size: 24px;
    font-weight: 700;
}

.ezycr-points-display {
    text-align: right;
}

.ezycr-points-number {
    display: block;
    font-size: 42px;
    font-weight: 700;
    color: #fbbf24;
}

.ezycr-points-label {
    font-size: 14px;
    opacity: 0.8;
}

.ezycr-tier-progress {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.ezycr-tier-progress h4 {
    margin: 0 0 15px;
}

.ezycr-progress-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ezycr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.ezycr-tier-progress p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.ezycr-benefits-section {
    margin-bottom: 30px;
}

.ezycr-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ezycr-benefits-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #10b981;
    font-weight: 500;
}

.ezycr-tiers-overview {
    margin-bottom: 30px;
}

.ezycr-tiers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.ezycr-tier-card {
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid transparent;
}

.ezycr-tier-card.current {
    border-color: #2563eb;
    background: #eff6ff;
}

.ezycr-tier-card h4 {
    margin: 0 0 5px;
    font-size: 16px;
}

.ezycr-tier-requirement {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 15px;
}

.ezycr-tier-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.ezycr-tier-card li {
    padding: 5px 0;
    color: #374151;
}

.ezycr-points-info {
    background: #fef3c7;
    padding: 20px;
    border-radius: 12px;
}

.ezycr-points-info h3 {
    margin: 0 0 15px;
    color: #92400e;
}

.ezycr-points-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ezycr-points-info li {
    padding: 8px 0;
    color: #78350f;
}

/* ================================
   MODALS
   ================================ */
.ezycr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ezycr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.ezycr-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.ezycr-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.ezycr-modal-content h3 {
    margin: 0 0 10px;
}

.ezycr-modal-content > p {
    color: #64748b;
    margin: 0 0 20px;
}

/* Photo Upload */
.ezycr-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.ezycr-upload-area:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.ezycr-upload-area input {
    display: none;
}

.ezycr-upload-area label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.ezycr-upload-area label span:first-child {
    font-size: 48px;
}

.ezycr-photo-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.ezycr-photo-preview img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.ezycr-mod-note {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin-top: 15px;
}

/* ================================
   BUTTONS
   ================================ */
.ezycr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.ezycr-btn-primary {
    background: #2563eb;
    color: white;
}

.ezycr-btn-primary:hover {
    background: #1d4ed8;
}

.ezycr-btn-secondary {
    background: #f1f5f9;
    color: #374151;
}

.ezycr-btn-secondary:hover {
    background: #e2e8f0;
}

.ezycr-btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}

.ezycr-btn-outline:hover {
    background: #f8fafc;
}

.ezycr-btn-block {
    width: 100%;
}

.ezycr-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ================================
   VERIFICATION RESULTS
   ================================ */
.ezycr-verification-result {
    max-width: 500px;
    margin: 60px auto;
    padding: 40px;
    text-align: center;
    border-radius: 16px;
}

.ezycr-verification-result.ezycr-success {
    background: #f0fdf4;
}

.ezycr-verification-result.ezycr-success h2 {
    color: #16a34a;
}

.ezycr-verification-result.ezycr-error {
    background: #fef2f2;
}

.ezycr-verification-result.ezycr-error h2 {
    color: #dc2626;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
    .ezycr-portal-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ezycr-tiers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ezycr-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ezycr-portal {
        padding: 10px;
    }
    
    .ezycr-portal-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
        border-radius: 12px;
    }
    
    .ezycr-portal-user {
        flex-direction: column;
    }
    
    .ezycr-portal-avatar {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .ezycr-portal-user-info h2 {
        font-size: 18px;
    }
    
    .ezycr-loyalty-badge {
        font-size: 12px;
        padding: 3px 10px;
    }
    
    .ezycr-portal-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 8px;
        gap: 3px;
    }
    
    .ezycr-portal-nav a {
        padding: 10px 15px;
        font-size: 13px;
        min-width: max-content;
    }
    
    .ezycr-portal-content {
        padding: 15px;
        border-radius: 12px;
    }
    
    .ezycr-portal-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .ezycr-stat-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 8px;
    }
    
    .ezycr-stat-icon {
        font-size: 28px;
    }
    
    .ezycr-stat-card h4 {
        font-size: 20px;
    }
    
    .ezycr-stat-card p {
        font-size: 12px;
    }
    
    .ezycr-quick-actions {
        grid-template-columns: 1fr;
    }
    
    .ezycr-portal-section h3 {
        font-size: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .ezycr-form-row {
        grid-template-columns: 1fr;
    }
    
    /* Booking card mobile */
    .ezycr-booking-card {
        padding: 15px;
    }
    
    .ezycr-booking-card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .ezycr-booking-card-header h4 {
        font-size: 16px;
    }
    
    .ezycr-booking-dates {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .ezycr-booking-dates > div {
        align-items: center;
    }
    
    .ezycr-booking-dates .ezycr-arrow {
        transform: none;
        font-size: 16px;
        color: #94a3b8;
    }
    
    .ezycr-booking-dates .ezycr-value {
        font-size: 16px;
    }
    
    .ezycr-booking-card-footer {
        flex-direction: column;
    }
    
    .ezycr-booking-card-footer .ezycr-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .ezycr-bookings-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .ezycr-tab {
        padding: 8px 15px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .ezycr-photos-grid {
        grid-template-columns: 1fr;
    }
    
    .ezycr-rewards-status {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .ezycr-points-display {
        text-align: center;
    }
    
    .ezycr-tiers-grid {
        grid-template-columns: 1fr;
    }
    
    .ezycr-auth-wrapper {
        padding: 15px;
        margin: 20px auto;
    }
    
    .ezycr-auth-form {
        padding: 20px;
    }
    
    .ezycr-auth-form h2 {
        font-size: 20px;
    }
    
    /* Hide logout button text on mobile, show just icon */
    .ezycr-portal-header .ezycr-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}
