:root {
    --wcac-primary-color: #e91e63;
    --wcac-secondary-color: #14aecf;
    --wcac-danger-color: #cf2e2e;
    --wcac-success-color: #4CAF50;
    --wcac-warning-color: #ff6900;
    --wcac-sidebar-bg: #f8f9fa;
    --wcac-sidebar-width: 300px;
    --wcac-content-padding: 2rem;
    --wcac-border-color: #e0e0e0;
    --wcac-text-primary: #282d5c;
    --wcac-text-secondary: #666;
    --wcac-button-radius: 12px;
}

/* Override WooCommerce default styles */
.woocommerce-account .woocommerce-MyAccount-navigation {
    width: var(--wcac-sidebar-width);
    float: none;
}

.woocommerce-account .woocommerce-MyAccount-content {
    float: none;
    width: 100%;
}

.woocommerce-MyAccount-content {
    padding: 0 !important;
}

.wcac-my-account-wrapper {
    display: flex;
    min-height: calc(100vh - 200px);
    margin: -2rem;
    background: white;
}

.wcac-sidebar {
    width: var(--wcac-sidebar-width);
    background: var(--wcac-sidebar-bg);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--wcac-border-color);
    padding: 2rem 1rem;
}

.wcac-user-info {
    padding: 0 1rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--wcac-border-color);
    margin-bottom: 2rem;
}

.wcac-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.wcac-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcac-user-name {
    color: var(--wcac-text-primary);
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.4;
}

/* Navigation Styling */
.wcac-navigation ul,
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wcac-navigation li,
.woocommerce-MyAccount-navigation li {
    margin: 0 0 0.5rem 0;
}

.wcac-navigation a,
.woocommerce-MyAccount-navigation a {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem !important;
    color: white !important;
    background: var(--wcac-primary-color) !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    position: relative;
    border-radius: var(--wcac-button-radius);
    min-height: 80px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
}

/* Handle existing WooCommerce ::before pseudo element */
.woocommerce-MyAccount-navigation a::before {
    display: none !important; /* Hide the default WooCommerce icon */
}

/* Custom icon styling */
.wcac-navigation a::after,
.woocommerce-MyAccount-navigation a::after {
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free" !important;
    font-weight: 400;
    font-size: 24px;
    margin-bottom: 0.5rem;
    display: block;
    order: -1; /* Place icon above text */
}

/* Icon definitions using ::after to avoid conflicts */
.icon-fa-th-large a::after { content: "\f009"; }
.icon-fa-clock a::after { content: "\f017"; }
.icon-fa-graduation-cap a::after { content: "\f19d"; }
.icon-fa-calendar-alt a::after { content: "\f073"; }
.icon-fa-file-certificate a::after { content: "\f5f3"; }
.icon-fa-clipboard-list a::after { content: "\f46d"; }
.icon-fa-cog a::after { content: "\f013"; }
.icon-fa-sign-out-alt a::after { content: "\f2f5"; }

.wcac-navigation a:hover,
.woocommerce-MyAccount-navigation a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.wcac-navigation .is-active a,
.woocommerce-MyAccount-navigation .is-active a {
    background: var(--wcac-secondary-color) !important;
}

/* Active indicator line */
.wcac-navigation .is-active a::before,
.woocommerce-MyAccount-navigation .is-active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #0073aa;
    border-radius: 0 4px 4px 0;
    display: block !important;
}

.wcac-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.wcac-content-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Mobile Responsive - No manual toggle needed */
@media (max-width: 768px) {
    .wcac-my-account-wrapper {
        flex-direction: column;
    }
    
    .wcac-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--wcac-border-color);
        padding: 1rem;
    }
    
    .wcac-user-info {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Convert navigation to horizontal scroll on mobile */
    .wcac-navigation ul,
    .woocommerce-MyAccount-navigation ul {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }
    
    .wcac-navigation li,
    .woocommerce-MyAccount-navigation li {
        flex: 0 0 auto;
        margin-right: 0.5rem;
    }
    
    .wcac-navigation a,
    .woocommerce-MyAccount-navigation a {
        min-width: 100px;
        font-size: 14px;
    }
    
    .wcac-content {
        padding: 1rem;
    }
}

/* Smaller mobile devices */
@media (max-width: 480px) {
    /* Stack navigation vertically on very small screens */
    .wcac-navigation ul,
    .woocommerce-MyAccount-navigation ul {
        flex-direction: column;
        overflow-x: visible;
    }
    
    .wcac-navigation li,
    .woocommerce-MyAccount-navigation li {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .wcac-navigation a,
    .woocommerce-MyAccount-navigation a {
        min-width: 100%;
    }
}

/* Avatar Upload Styles */
.wcac-avatar-upload {
    margin: 2rem 0;
}

.wcac-avatar-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid var(--wcac-border-color);
}

.wcac-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcac-avatar-actions {
    text-align: center;
}

.wcac-button {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--wcac-primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease;
    margin: 0.25rem;
}

.wcac-button:hover {
    background: var(--wcac-secondary-color);
}

.wcac-button.danger {
    background: var(--wcac-danger-color);
}

.wcac-button.danger:hover {
    background: #a02424;
}

/* Form Styles */
.wcac-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .wcac-form-row {
        grid-template-columns: 1fr;
    }
}

.wcac-form-field {
    display: flex;
    flex-direction: column;
}

.wcac-form-field label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--wcac-text-primary);
}

.wcac-form-field input,
.wcac-form-field textarea {
    padding: 0.75rem;
    border: 1px solid var(--wcac-border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.wcac-form-field input:focus,
.wcac-form-field textarea:focus {
    outline: none;
    border-color: var(--wcac-primary-color);
}

/* Section Styles */
.wcac-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--wcac-border-color);
}

.wcac-section:last-child {
    border-bottom: none;
}

.wcac-section h2 {
    color: var(--wcac-text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Notification Styles */
.wcac-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 9999;
    max-width: 300px;
}

.wcac-notification.show {
    transform: translateX(0);
}

.wcac-notification-success {
    background: var(--wcac-success-color);
}

.wcac-notification-error {
    background: var(--wcac-danger-color);
}

.wcac-notification-info {
    background: var(--wcac-primary-color);
}