/**
 * Modern My Account Widget Styles
 * Production-ready with modern aesthetic
 */

:root {
    --epcourse-accent: #2E8BFF;
    --epcourse-bg-gradient-start: #f8f9fa;
    --epcourse-bg-gradient-end: #ffffff;
    --epcourse-card-radius: 16px;
    --epcourse-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --epcourse-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --epcourse-text-primary: #1a1a1a;
    --epcourse-text-secondary: #6b7280;
    --epcourse-border: #e5e7eb;
    --epcourse-success: #10b981;
    --epcourse-processing: #f59e0b;
    --epcourse-on-hold: #ef4444;
    --epcourse-cancelled: #6b7280;
}

/* Main Container */
.epcourse-modern-account {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Poppins', Roboto, sans-serif;
    background: #f5f5f5;
    padding: 24px;
    min-height: 100vh;
}

.epcourse-modern-account-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 968px) {
    .epcourse-modern-account-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .epcourse-profile-card {
        position: relative;
        top: 0;
    }
}

/* Profile Card */
.epcourse-profile-card {
    background: #ffffff;
    border-radius: var(--epcourse-card-radius);
    padding: 32px 24px;
    box-shadow: var(--epcourse-shadow);
    text-align: center;
    position: sticky;
    top: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--epcourse-border);
}

.epcourse-profile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--epcourse-shadow-hover);
}

.epcourse-profile-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--epcourse-border);
}

.epcourse-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.epcourse-profile-greeting {
    font-size: 20px;
    font-weight: 600;
    color: var(--epcourse-text-primary);
    margin: 0 0 12px;
    line-height: 1.3;
}

.epcourse-membership-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--epcourse-accent), #1e6fd9);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.epcourse-profile-welcome {
    color: var(--epcourse-text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px;
}

.epcourse-edit-profile-btn {
    display: inline-block;
    background: #000000;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: 8px;
}

.epcourse-edit-profile-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Tabs Container */
.epcourse-tabs-container {
    background: #ffffff;
    border-radius: var(--epcourse-card-radius);
    box-shadow: var(--epcourse-shadow);
    overflow: hidden;
}

.epcourse-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--epcourse-border);
    background: #ffffff;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.epcourse-tabs-nav::-webkit-scrollbar {
    display: none;
}

.epcourse-tab-btn {
    flex: 0 0 auto;
    min-width: 100px;
    padding: 16px 12px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #666666;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.epcourse-tab-btn:hover {
    color: #000000;
}

.epcourse-tab-btn.active {
    color: #000000;
    border-bottom-color: #8234EE;
    background: #ffffff;
    font-weight: 600;
}

.epcourse-tab-btn:focus {
    outline: 2px solid var(--epcourse-accent);
    outline-offset: -2px;
}

/* Tab Panels */
.epcourse-tabs-content {
    position: relative;
    min-height: 400px;
}

.epcourse-tab-panel {
    display: none;
    padding: 24px 32px 32px;
    animation: fadeIn 0.3s ease;
}

.epcourse-tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.epcourse-tab-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--epcourse-text-primary);
    margin: 0 0 24px;
}

/* Overview Tab - Quick Actions */
.epcourse-quick-actions {
    margin-top: 24px;
}

.epcourse-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .epcourse-quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

.epcourse-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    color: var(--epcourse-text-primary);
    transition: all 0.3s ease;
    border: 1px solid var(--epcourse-border);
    min-height: 100px;
}

.epcourse-action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--epcourse-shadow);
    background: #fafafa;
}

.epcourse-action-card:focus {
    outline: 2px solid var(--epcourse-accent);
    outline-offset: 2px;
}

.epcourse-action-logout {
    /* border: 2px solid #ef4444; */
}

.epcourse-action-logout:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.epcourse-action-logout .epcourse-action-icon {
    /* color: #ef4444; */
}

.epcourse-action-logout:hover .epcourse-action-icon {
    color: #dc2626;
}

.epcourse-action-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.epcourse-action-icon svg {
    width: 100%;
    height: 100%;
}

.epcourse-action-card:hover .epcourse-action-icon {
    transform: scale(1.05);
}

.epcourse-action-label {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    color: #000000;
    line-height: 1.3;
}

/* Orders Tab */
.epcourse-orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.epcourse-orders-list > * {
    width: 100%;
}

.epcourse-order-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid var(--epcourse-border);
    transition: all 0.3s ease;
}

.epcourse-order-item:hover {
    box-shadow: var(--epcourse-shadow);
    transform: translateX(4px);
}

.epcourse-order-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.epcourse-order-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.epcourse-order-details {
    flex: 1;
    min-width: 0;
}

.epcourse-order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 12px;
}

.epcourse-order-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--epcourse-text-primary);
    margin: 0;
}

.epcourse-order-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.epcourse-status-completed,
.epcourse-status-processing {
    background: rgba(16, 185, 129, 0.1);
    color: var(--epcourse-success);
}

.epcourse-status-processing {
    background: rgba(245, 158, 11, 0.1);
    color: var(--epcourse-processing);
}

.epcourse-status-on-hold {
    background: rgba(239, 68, 68, 0.1);
    color: var(--epcourse-on-hold);
}

.epcourse-status-cancelled,
.epcourse-status-refunded {
    background: rgba(107, 114, 128, 0.1);
    color: var(--epcourse-cancelled);
}

.epcourse-order-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--epcourse-text-secondary);
}

.epcourse-order-total {
    font-weight: 600;
    color: var(--epcourse-text-primary);
}

.epcourse-order-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Buttons - General */
.epcourse-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    line-height: 1.5;
    box-sizing: border-box;
}

.epcourse-btn-outline {
    background: transparent;
    color: var(--epcourse-accent);
    border: 2px solid var(--epcourse-accent);
}

.epcourse-btn-outline:hover {
    background: var(--epcourse-accent);
    color: #ffffff;
}

/* Form-specific buttons (address forms, account details, etc.) override general styles */
.epcourse-address-form .epcourse-btn,
.epcourse-account-details-form .epcourse-btn,
.epcourse-profile-edit-form .epcourse-btn {
    padding: 12px 24px;
    border-radius: 6px;
    min-width: 120px;
}

.epcourse-view-all {
    margin-top: 24px;
    text-align: center;
}

/* Addresses Tab */
.epcourse-addresses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.epcourse-address-card {
    padding: 24px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid var(--epcourse-border);
    position: relative;
}

.epcourse-address-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--epcourse-text-primary);
}

.epcourse-address-display {
    color: var(--epcourse-text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    min-height: 80px;
}

.epcourse-address-form {
    margin-top: 16px;
}

.epcourse-address-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.epcourse-address-fields .epcourse-form-group {
    margin-bottom: 0;
}

.epcourse-address-fields label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--epcourse-text-primary);
    margin-bottom: 6px;
}

.epcourse-address-fields input[type="text"],
.epcourse-address-fields select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--epcourse-border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.epcourse-address-fields input[type="text"]:focus,
.epcourse-address-fields select:focus {
    outline: none;
    border-color: var(--epcourse-accent);
    box-shadow: 0 0 0 3px rgba(46, 139, 255, 0.1);
}

.epcourse-address-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.epcourse-address-form-actions .epcourse-btn {
    flex: 1;
}


/* Account Details Tab */
.epcourse-account-details-form {
    max-width: 600px;
}

.epcourse-form-group {
    margin-bottom: 20px;
}

.epcourse-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--epcourse-text-primary);
    margin-bottom: 8px;
}

.epcourse-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--epcourse-border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.epcourse-form-group input:focus {
    outline: none;
    border-color: var(--epcourse-accent);
    box-shadow: 0 0 0 3px rgba(46, 139, 255, 0.1);
}

.epcourse-form-group input:invalid {
    border-color: var(--epcourse-on-hold);
}

/* Downloads Tab */
.epcourse-downloads-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.epcourse-download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid var(--epcourse-border);
}

.epcourse-download-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--epcourse-text-primary);
}

.epcourse-download-info p {
    font-size: 14px;
    color: var(--epcourse-text-secondary);
    margin: 0;
}

/* Empty State */
.epcourse-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--epcourse-text-secondary);
}

.epcourse-empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Skeleton Loader */
.epcourse-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Design */
/* Tablet and below (968px) */
@media (max-width: 968px) {
    .epcourse-modern-account {
        padding: 20px;
    }
    
    .epcourse-modern-account-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .epcourse-profile-card {
        position: static;
        padding: 24px 20px;
    }
    
    .epcourse-profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .epcourse-profile-greeting {
        font-size: 22px;
    }
    
    .epcourse-tabs-container {
        border-radius: 12px;
    }
    
    .epcourse-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .epcourse-tab-btn {
        min-width: 110px;
        padding: 14px 18px;
        font-size: 13px;
    }
    
    .epcourse-tab-panel {
        padding: 24px;
    }
    
    .epcourse-quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .epcourse-action-card {
        padding: 20px;
    }
    
    .epcourse-action-icon {
        width: 44px;
        height: 44px;
    }
    
    .epcourse-addresses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .epcourse-order-item {
        flex-wrap: wrap;
        padding: 16px;
    }
    
    .epcourse-order-thumbnail {
        width: 70px;
        height: 70px;
    }
    
    .epcourse-order-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 12px;
        flex-wrap: wrap;
    }
    
    .epcourse-order-actions .epcourse-btn {
        flex: 1;
        min-width: 100px;
    }
}

/* Address Forms */
.epcourse-addresses-tab {
    padding: 0;
}

.epcourse-addresses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 968px) {
    .epcourse-addresses-grid {
        grid-template-columns: 1fr;
    }
}

.epcourse-address-card {
    background: #ffffff;
    border: 1px solid var(--epcourse-border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.epcourse-address-card:hover {
    box-shadow: var(--epcourse-shadow);
}

.epcourse-address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--epcourse-border);
}

.epcourse-address-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--epcourse-text-primary);
}

.epcourse-edit-address-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.epcourse-edit-address-btn:hover {
    background: #333333;
    transform: translateY(-1px);
}

.epcourse-edit-address-btn svg {
    width: 14px;
    height: 14px;
}

.epcourse-formatted-address {
    font-style: normal;
    line-height: 1.8;
    color: var(--epcourse-text-secondary);
    margin: 0;
}

.epcourse-empty-address {
    color: var(--epcourse-text-secondary);
    font-style: italic;
    margin: 0;
}

.epcourse-address-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--epcourse-border);
    clear: both;
}

.epcourse-address-form::before,
.epcourse-address-form::after {
    content: "";
    display: table;
    clear: both;
}

/* Form Styles */
.epcourse-form-row {
    margin-bottom: 20px;
}

.epcourse-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--epcourse-text-primary);
}

.epcourse-form-row .required {
    color: #ef4444;
}

.epcourse-form-row input[type="text"],
.epcourse-form-row input[type="email"],
.epcourse-form-row input[type="tel"],
.epcourse-form-row input[type="password"],
.epcourse-form-row select,
.epcourse-form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--epcourse-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--epcourse-text-primary);
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.epcourse-form-row input:focus,
.epcourse-form-row select:focus,
.epcourse-form-row textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.epcourse-form-row input.error,
.epcourse-form-row select.error,
.epcourse-form-row textarea.error {
    border-color: #ef4444;
}

.epcourse-form-row .description {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--epcourse-text-secondary);
    font-style: italic;
}

.epcourse-form-row-first {
    float: left;
    width: 48%;
    margin-right: 4%;
}

[dir="rtl"] .epcourse-form-row-first {
    float: right;
    margin-right: 0;
    /* margin-left: 4%; */
}

.epcourse-form-row-last {
    float: right;
    width: 48%;
    margin-right: 0;
}

[dir="rtl"] .epcourse-form-row-last {
    float: left;
    margin-left: 0;
    /* margin-right: 4%; */
}

.epcourse-form-row-wide {
    clear: both;
    width: 100%;
}

.epcourse-form-row:after {
    content: "";
    display: table;
    clear: both;
}

/* Form Actions Container */
.epcourse-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--epcourse-border);
    clear: both;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
}

.epcourse-form-actions::before,
.epcourse-form-actions::after {
    content: "";
    display: table;
    clear: both;
}

/* Form Button Styles - Override general button styles for forms */
.epcourse-form-actions .epcourse-btn,
.epcourse-form-actions .epcourse-btn-primary,
.epcourse-form-actions .epcourse-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-sizing: border-box;
    min-width: 120px;
    line-height: 1.5;
    white-space: nowrap;
}

.epcourse-form-actions .epcourse-btn-primary {
    background: #000000;
    color: #ffffff !important;
    border: none;
}

.epcourse-form-actions .epcourse-btn-primary:hover {
    background: #333333;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.epcourse-form-actions .epcourse-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.epcourse-form-actions .epcourse-btn-primary:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

.epcourse-form-actions .epcourse-btn-secondary {
    background: #f5f5f5;
    color: #000000 !important;
    border: 1px solid var(--epcourse-border);
}

.epcourse-form-actions .epcourse-btn-secondary:hover {
    background: #e5e5e5;
    border-color: #000000;
    color: #000000 !important;
}

.epcourse-form-actions .epcourse-btn-secondary:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

.epcourse-form-actions .epcourse-btn:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* Account Details Form */
.epcourse-account-details-tab {
    padding: 0;
}

.epcourse-account-details-form {
    max-width: 600px;
}

.epcourse-password-fieldset {
    border: 1px solid var(--epcourse-border);
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.epcourse-password-fieldset legend {
    padding: 0 12px;
    font-weight: 600;
    font-size: 14px;
    color: var(--epcourse-text-primary);
}

/* Profile Edit Form */
.epcourse-profile-edit-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--epcourse-border);
}

/* Error Messages */
.epcourse-error-message {
    display: block;
    color: #ef4444;
    font-size: 14px;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ef4444;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

/* State Field */
.epcourse-state-field {
    position: relative;
}

.epcourse-state-field select {
    width: 100%;
}

/* Loading State */
.epcourse-loading {
    padding: 40px;
    text-align: center;
    color: var(--epcourse-text-secondary);
}

/* Success Message */
.epcourse-snackbar {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #10b981;
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Empty State */
.epcourse-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--epcourse-text-secondary);
}

.epcourse-empty p {
    margin: 0 0 16px;
}

/* Responsive Form Adjustments */
@media (max-width: 640px) {
    .epcourse-form-row-first,
    .epcourse-form-row-last {
        float: none;
        width: 100%;
        margin-right: 0;
    }
    
    .epcourse-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .epcourse-form-actions .epcourse-btn,
    .epcourse-form-actions .epcourse-btn-primary,
    .epcourse-form-actions .epcourse-btn-secondary {
        width: 100%;
        margin: 0;
        min-width: auto;
    }
    
    .epcourse-addresses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .epcourse-address-card {
        padding: 20px;
    }
    
    .epcourse-address-form {
        margin-top: 16px;
    }
    
    .epcourse-form-row {
        margin-bottom: 16px;
    }
}

/* Mobile (640px and below) */
@media (max-width: 640px) {
    .epcourse-modern-account {
        padding: 12px;
        min-height: auto;
    }

    .epcourse-tabs-nav {
        justify-content: flex-start;
    }

    .epcourse-tab-btn {
        flex: 0 0 auto;
        min-width: 110px;
    }
    
    .epcourse-modern-account-container {
        gap: 16px;
    }
    
    .epcourse-profile-card {
        padding: 20px 16px;
        border-radius: 12px;
    }
    
    .epcourse-profile-avatar {
        width: 80px;
        height: 80px;
        border-width: 3px;
        margin-bottom: 12px;
    }
    
    .epcourse-profile-greeting {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .epcourse-profile-welcome {
        font-size: 13px;
        margin-bottom: 16px;
    }
    
    .epcourse-edit-profile-btn {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
    }
    
    .epcourse-tabs-container {
        border-radius: 12px;
    }
    
    .epcourse-tabs-nav {
        padding: 0;
        border-bottom-width: 1px;
    }
    
    .epcourse-tab-btn {
        min-width: 90px;
        padding: 12px 14px;
        font-size: 12px;
        border-bottom-width: 2px;
    }
    
    .epcourse-tab-panel {
        padding: 20px 16px;
        min-height: 300px;
    }
    
    .epcourse-tab-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .epcourse-quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .epcourse-action-card {
        padding: 18px;
        flex-direction: row;
        text-align: left;
        align-items: center;
    }
    
    .epcourse-action-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0;
        margin-right: 12px;
        flex-shrink: 0;
    }
    
    .epcourse-action-label {
        font-size: 14px;
    }
    
    .epcourse-orders-list {
        gap: 12px;
    }
    
    .epcourse-order-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        gap: 12px;
    }
    
    .epcourse-order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }
    
    .epcourse-order-thumbnail {
        width: 100%;
        height: 180px;
        border-radius: 8px;
    }
    
    .epcourse-order-details-panel {
        margin-top: 12px;
    }
    
    .epcourse-order-details-panel .epcourse-order-details-content {
        padding: 16px;
    }
    
    .epcourse-order-details-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .epcourse-order-details-header h4 {
        font-size: 16px;
    }
    
    .epcourse-order-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .epcourse-order-item-row {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .epcourse-order-item-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .epcourse-order-item-total {
        width: 100%;
        text-align: left;
        margin-top: 8px;
        min-width: auto;
    }
    
    .epcourse-order-addresses-section {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .epcourse-order-details {
        width: 100%;
    }
    
    .epcourse-order-meta {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }
    
    .epcourse-order-actions {
        width: 100%;
        flex-direction: column;
        gap: 8px;
        margin-top: 0;
    }
    
    .epcourse-order-actions .epcourse-btn {
        width: 100%;
        text-align: center;
    }
    
    .epcourse-order-details-panel {
        margin-top: 12px;
    }
    
    .epcourse-order-details-panel .epcourse-order-details-content {
        padding: 16px;
    }
    
    .epcourse-order-details-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .epcourse-order-details-header h4 {
        font-size: 16px;
    }
    
    .epcourse-order-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .epcourse-order-item-row {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .epcourse-order-item-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .epcourse-order-item-total {
        width: 100%;
        text-align: left;
        margin-top: 8px;
        min-width: auto;
    }
    
    .epcourse-order-addresses-section {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 20px;
        padding-top: 20px;
    }
}

/* Order Details Panel */
.epcourse-order-details-panel {
    width: 100%;
    margin-top: 16px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    animation: slideDown 0.3s ease;
}

.epcourse-order-details-panel .epcourse-order-details-content {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--epcourse-border);
    box-shadow: var(--epcourse-shadow);
    padding: 24px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.epcourse-order-details-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
}

.epcourse-order-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--epcourse-border);
}

.epcourse-order-details-header h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--epcourse-text-primary);
}

.epcourse-close-order-details {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--epcourse-text-secondary);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.epcourse-close-order-details:hover {
    color: var(--epcourse-text-primary);
}

.epcourse-order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.epcourse-order-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.epcourse-order-info-item strong {
    font-size: 13px;
    color: var(--epcourse-text-secondary);
    font-weight: 600;
}

.epcourse-order-info-item span {
    font-size: 14px;
    color: var(--epcourse-text-primary);
}


.epcourse-order-items-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--epcourse-border);
}

.epcourse-order-items-section h5 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--epcourse-text-primary);
}

.epcourse-order-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.epcourse-order-item-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid var(--epcourse-border);
    transition: all 0.3s ease;
}

.epcourse-order-item-row:hover {
    background: #f5f5f5;
    border-color: var(--epcourse-accent);
    transform: translateX(4px);
}

.epcourse-order-item-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--epcourse-border);
    background: #ffffff;
}

.epcourse-order-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.epcourse-order-item-info {
    flex: 1;
    min-width: 0;
}

.epcourse-order-item-info h6 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--epcourse-text-primary);
    line-height: 1.4;
    word-wrap: break-word;
}

.epcourse-order-item-meta {
    font-size: 12px;
    color: var(--epcourse-text-secondary);
    margin: 4px 0 0;
    font-weight: 500;
}

.epcourse-order-item-variation {
    font-size: 12px;
    color: var(--epcourse-text-secondary);
    margin: 6px 0 0;
    line-height: 1.5;
    padding-top: 4px;
    border-top: 1px solid #e5e5e5;
}

.epcourse-order-item-variation dl {
    margin: 0;
}

.epcourse-order-item-variation dt {
    display: inline;
    font-weight: 600;
    margin-right: 4px;
}

.epcourse-order-item-variation dd {
    display: inline;
    margin: 0 8px 0 0;
}

.epcourse-order-item-total {
    font-size: 16px;
    font-weight: 600;
    color: var(--epcourse-text-primary);
    flex-shrink: 0;
    text-align: right;
    min-width: 80px;
    white-space: nowrap;
}

.epcourse-order-addresses-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--epcourse-border);
}

.epcourse-order-address {
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid var(--epcourse-border);
}

.epcourse-order-address h5 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--epcourse-text-primary);
}

.epcourse-order-address-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--epcourse-text-secondary);
}

/* My Courses Section */
.epcourse-my-account-courses {
    width: 100%;
}

.epcourse-my-account-courses h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 24px;
    color: var(--epcourse-text-primary);
}

.epcourse-courses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.epcourse-course-card {
    background: #ffffff;
    border-radius: var(--epcourse-card-radius);
    border: 1px solid var(--epcourse-border);
    box-shadow: var(--epcourse-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.epcourse-course-card:hover {
    box-shadow: var(--epcourse-shadow-hover);
    transform: translateY(-2px);
}

.epcourse-course-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.epcourse-course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.epcourse-course-card:hover .epcourse-course-thumbnail img {
    transform: scale(1.05);
}

.epcourse-course-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.epcourse-course-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--epcourse-text-primary);
    line-height: 1.4;
}

.epcourse-course-title a {
    color: var(--epcourse-text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.epcourse-course-title a:hover {
    color: var(--epcourse-accent);
}

.epcourse-course-excerpt {
    font-size: 14px;
    color: var(--epcourse-text-secondary);
    margin: 0 0 16px;
    line-height: 1.6;
    flex: 1;
}

.epcourse-course-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--epcourse-text-secondary);
}

.epcourse-episode-count,
.epcourse-course-duration {
    display: flex;
    align-items: center;
    gap: 4px;
}

.epcourse-access-expiry {
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #fff3cd;
    border-radius: 6px;
    font-size: 12px;
    color: #856404;
}

.epcourse-course-actions {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--epcourse-border);
}

.epcourse-course-actions .epcourse-btn {
    width: 100%;
    text-align: center;
    margin: 0;
}

.epcourse-course-actions .button {
    display: none; /* Hide old button class if any */
}

/* Responsive: My Courses */
@media (max-width: 968px) {
    .epcourse-courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
    .epcourse-modern-account {
        padding: 8px;
    }
    
    .epcourse-profile-card {
        padding: 16px 12px;
    }
    
    .epcourse-profile-avatar {
        width: 64px;
        height: 64px;
    }
    
    .epcourse-profile-greeting {
        font-size: 18px;
    }
    
    .epcourse-tab-btn {
        min-width: 80px;
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .epcourse-tab-panel {
        padding: 16px 12px;
    }
    
    .epcourse-tab-title {
        font-size: 16px;
    }
    
    .epcourse-action-card {
        padding: 14px;
    }
    
    .epcourse-action-icon {
        width: 36px;
        height: 36px;
    }
    
    .epcourse-action-label {
        font-size: 13px;
    }
    
    .epcourse-courses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .epcourse-course-thumbnail {
        height: 180px;
    }
    
    .epcourse-course-content {
        padding: 16px;
    }
    
    .epcourse-course-title {
        font-size: 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Pagination Styles */
.epcourse-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px 0;
}

.epcourse-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--epcourse-text-primary);
    background: #ffffff;
    border: 1px solid var(--epcourse-border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.epcourse-pagination-btn:hover {
    color: var(--epcourse-accent);
    border-color: var(--epcourse-accent);
    background: rgba(46, 139, 255, 0.05);
    text-decoration: none;
}

.epcourse-pagination-current {
    color: #ffffff;
    background: var(--epcourse-accent);
    border-color: var(--epcourse-accent);
}

.epcourse-pagination-prev,
.epcourse-pagination-next {
    padding: 8px 16px;
}

/* Print Styles */
@media print {
    .epcourse-modern-account {
        background: #ffffff;
        padding: 0;
    }
    
    .epcourse-profile-card,
    .epcourse-tabs-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .epcourse-tabs-nav {
        display: none;
    }
    
    .epcourse-tab-panel {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .epcourse-pagination {
        display: none;
    }
}

