/* My Account Tabs Plugin - Styles */

/* Hide default WooCommerce columns when plugin is active */
.mat-active .woocommerce .col2-set .col-1,
.mat-active .woocommerce .col2-set .col-2,
.mat-active .woocommerce .u-columns,
.mat-active .woocommerce .u-column1,
.mat-active .woocommerce .u-column2 {
    display: none !important;
}

/* Main wrapper */
.mat-wrapper {
    max-width: 500px;
    margin: 0 auto 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.mat-container {
    position: relative;
}

/* Tab Navigation */
.mat-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.mat-tab-button {
    flex: 1;
    padding: 16px 24px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mat-tab-button:hover {
    background: #e9ecef;
    color: #495057;
}

.mat-tab-button.active {
    color: #0073aa;
    background: #ffffff;
}

.mat-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0073aa, #005a87);
    border-radius: 3px 3px 0 0;
}

/* Form containers */
.mat-forms {
    position: relative;
    min-height: 400px;
}

.mat-form-container {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.mat-form-container.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    position: relative;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mat-form-content {
    padding: 32px;
}

.mat-form-content h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    position: relative;
}

.mat-form-description {
    text-align: center;
    color: #6c757d;
    margin: 0 0 24px 0;
    font-size: 14px;
}

.mat-form-content h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #0073aa, #005a87);
    border-radius: 2px;
}

/* Override WooCommerce form styling */
.mat-active .woocommerce-form-row {
    margin-bottom: 20px;
}

.mat-active .woocommerce-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mat-active .required {
    color: #e74c3c;
    font-weight: bold;
}

/* Input fields */
.mat-active .woocommerce-Input,
.mat-active .input-text {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.mat-active .woocommerce-Input:focus,
.mat-active .input-text:focus {
    outline: none !important;
    border-color: #0073aa !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1) !important;
    transform: translateY(-1px) !important;
}

.mat-active .woocommerce-Input:hover,
.mat-active .input-text:hover {
    border-color: #ced4da !important;
}

/* Password input container */
.mat-active .password-input {
    position: relative;
    display: block;
}

.mat-active .show-password-input {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #6c757d;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10;
}

.mat-active .show-password-input:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Checkbox styling */
.mat-active .woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    margin-bottom: 20px;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 14px !important;
}

.mat-active .woocommerce-form__input-checkbox {
    width: auto !important;
    margin-right: 8px !important;
    margin-bottom: 0 !important;
    transform: scale(1.2);
    position: relative;
}

/* Buttons */
.mat-active .woocommerce-button,
.mat-active .woocommerce-Button,
.mat-active .button {
    background: linear-gradient(135deg, #0073aa, #005a87) !important;
    color: white !important;
    border: none !important;
    padding: 14px 32px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    width: 100% !important;
    margin-top: 8px !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
}

.mat-active .woocommerce-button:hover,
.mat-active .woocommerce-Button:hover,
.mat-active .button:hover {
    background: linear-gradient(135deg, #005a87, #004666) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.3) !important;
}

.mat-active .woocommerce-button:active,
.mat-active .woocommerce-Button:active,
.mat-active .button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(0, 115, 170, 0.2) !important;
}

/* Lost password link */
.mat-active .lost_password {
    text-align: center;
    margin-top: 20px;
}

.mat-active .lost_password a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.mat-active .lost_password a:hover {
    color: #005a87;
}

.mat-active .lost_password a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0073aa;
    transition: width 0.3s ease;
}

.mat-active .lost_password a:hover::after {
    width: 100%;
}

/* Form row with button */
.mat-active .form-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Error and success messages */
.mat-active .woocommerce-error,
.mat-active .woocommerce-message,
.mat-active .woocommerce-info {
    padding: 12px 16px !important;
    margin: 0 32px 20px 32px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    border: none !important;
}

.mat-active .woocommerce-error {
    background: #ffeaea !important;
    color: #d63384 !important;
    border-left: 4px solid #d63384 !important;
}

.mat-active .woocommerce-message,
.mat-active .woocommerce-info {
    background: #d1edff !important;
    color: #0c63e4 !important;
    border-left: 4px solid #0c63e4 !important;
}

/* Loading state */
.mat-form-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.mat-form-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .mat-wrapper {
        margin: 16px;
        border-radius: 8px;
    }
    
    .mat-form-content {
        padding: 24px 20px;
    }
    
    .mat-tab-button {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .mat-form-content h2 {
        font-size: 24px;
    }
    
    .mat-active .woocommerce-Input,
    .mat-active .input-text {
        padding: 12px 14px !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .mat-active .woocommerce-error,
    .mat-active .woocommerce-message,
    .mat-active .woocommerce-info {
        margin: 0 20px 20px 20px !important;
    }
}

@media (max-width: 480px) {
    .mat-form-content {
        padding: 20px 16px;
    }
    
    .mat-tab-button {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .mat-active .woocommerce-error,
    .mat-active .woocommerce-message,
    .mat-active .woocommerce-info {
        margin: 0 16px 20px 16px !important;
    }
}

/* Accessibility improvements */
.mat-tab-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.mat-active .woocommerce-Input:focus,
.mat-active .input-text:focus {
    outline: none !important;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px !important;
    height: 1px !important;
    overflow: hidden;
}

/* Custom primary color support */
:root {
    --mat-primary-color: #0073aa;
    --mat-primary-dark: #005a87;
    --mat-primary-darker: #004666;
}

.mat-tab-button.active {
    color: var(--mat-primary-color);
}

.mat-tab-button.active::after {
    background: linear-gradient(90deg, var(--mat-primary-color), var(--mat-primary-dark));
}

.mat-form-content h2::after {
    background: linear-gradient(90deg, var(--mat-primary-color), var(--mat-primary-dark));
}

.mat-active .woocommerce-Input:focus,
.mat-active .input-text:focus {
    border-color: var(--mat-primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1) !important;
}

.mat-active .woocommerce-button,
.mat-active .woocommerce-Button,
.mat-active .button {
    background: linear-gradient(135deg, var(--mat-primary-color), var(--mat-primary-dark)) !important;
}

.mat-active .woocommerce-button:hover,
.mat-active .woocommerce-Button:hover,
.mat-active .button:hover {
    background: linear-gradient(135deg, var(--mat-primary-dark), var(--mat-primary-darker)) !important;
}

.mat-active .lost_password a {
    color: var(--mat-primary-color);
}

.mat-active .lost_password a:hover {
    color: var(--mat-primary-dark);
}

.mat-active .lost_password a::after {
    background: var(--mat-primary-color);
}

.mat-form-container.loading::after {
    border-top: 2px solid var(--mat-primary-color);
}

.mat-tab-button:focus {
    outline: 2px solid var(--mat-primary-color);
}

