/**
 * Custom WooCommerce Auth Styles
 */

/* Form Wrappers */
.cwa-login-form-wrapper,
.cwa-register-form-wrapper,
.cwa-reset-form-wrapper,
.woo-account-pro-wrapper {
    margin: 0 auto;
    box-sizing: border-box;
}

.cwa-login-form-wrapper *,
.cwa-register-form-wrapper *,
.cwa-reset-form-wrapper *,
.woo-account-pro-wrapper * {
    box-sizing: border-box;
}

/* Form Title */
.cwa-form-title,
.wap-form-title {
    margin: 0 0 20px;
    font-weight: 600;
}

/* Form Rows */
.cwa-form-row,
.wap-form-row {
    margin-bottom: 20px;
}

.cwa-form-row:last-of-type,
.wap-form-row:last-of-type {
    margin-bottom: 0;
}

/* Labels */
.cwa-form-label,
.wap-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.cwa-form-label .required,
.wap-form-label .required {
    color: #ff0000;
}

/* Input Fields */
.cwa-form-input,
.wap-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.cwa-form-input:focus,
.wap-form-input:focus {
    border-color: #333;
    box-shadow: 0 0 0 1px rgba(51, 51, 51, 0.1);
}

.cwa-form-input::placeholder,
.wap-form-input::placeholder {
    color: #999;
}

/* Checkbox */
.cwa-checkbox-label,
.cwa-remember-row label,
.wap-checkbox-label,
.wap-remember-row label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.cwa-checkbox-label input[type="checkbox"],
.cwa-remember-row input[type="checkbox"],
.wap-checkbox-label input[type="checkbox"],
.wap-remember-row input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

/* Button */
.cwa-form-button,
.wap-form-button {
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}

.cwa-form-button:hover,
.wap-form-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cwa-form-button:active,
.wap-form-button:active {
    transform: translateY(0);
}

.cwa-form-button-wrapper,
.wap-form-button-wrapper {
    display: flex;
    justify-content: center;
}

/* Links */
.cwa-form-links,
.wap-form-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.cwa-form-links a,
.wap-form-links a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cwa-form-links a:hover,
.wap-form-links a:hover {
    color: #666;
    text-decoration: underline;
}

.cwa-form-links .separator,
.wap-form-links .separator {
    margin: 0 8px;
    color: #ccc;
}

/* Woo Account Pro Dashboard */
.woo-account-pro-dashboard .wap-user-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.woo-account-pro-dashboard .wap-user-header img {
    border-radius: 50%;
}

.woo-account-pro-dashboard .wap-user-info h3 {
    margin: 0 0 5px;
    font-size: 20px;
}

.woo-account-pro-dashboard .wap-user-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* WooCommerce Integration */
.woo-account-pro-dashboard .woocommerce-MyAccount-navigation {
    margin-bottom: 20px;
}

.woo-account-pro-dashboard .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woo-account-pro-dashboard .woocommerce-MyAccount-navigation li {
    margin-bottom: 5px;
}

.woo-account-pro-dashboard .woocommerce-MyAccount-navigation a {
    display: block;
    padding: 10px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.woo-account-pro-dashboard .woocommerce-MyAccount-navigation a:hover,
.woo-account-pro-dashboard .woocommerce-MyAccount-navigation .is-active a {
    background: #f5f5f5;
}

/* WooCommerce Notices */
.cwa-login-form-wrapper .woocommerce-error,
.cwa-register-form-wrapper .woocommerce-error,
.cwa-reset-form-wrapper .woocommerce-error,
.woo-account-pro-wrapper .woocommerce-error,
.cwa-login-form-wrapper .woocommerce-message,
.cwa-register-form-wrapper .woocommerce-message,
.cwa-reset-form-wrapper .woocommerce-message,
.woo-account-pro-wrapper .woocommerce-message {
    margin-bottom: 20px;
}

/* Checkout Registration */
.custom-checkout-registration {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.custom-checkout-account-fields {
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .cwa-login-form-wrapper,
    .cwa-register-form-wrapper,
    .cwa-reset-form-wrapper {
        padding: 20px !important;
    }
    
    .cwa-form-button {
        width: 100%;
    }
}

/* Loading State */
.cwa-form-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.cwa-form-button.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: cwa-spin 0.6s linear infinite;
}

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

/* Accessibility */
.cwa-form-input:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.cwa-form-button:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

/* Additional Woo Account Pro Dashboard Styles */

/* Dashboard Layouts */
.wap-dashboard-wrapper {
    width: 100%;
}

.wap-dashboard-wrapper.layout-vertical {
    display: flex;
    gap: 30px;
}

.wap-dashboard-wrapper.layout-vertical .woocommerce-MyAccount-navigation {
    flex: 0 0 250px;
}

.wap-dashboard-wrapper.layout-vertical .woocommerce-MyAccount-content {
    flex: 1;
}

.wap-dashboard-wrapper.layout-horizontal .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.wap-dashboard-wrapper.layout-horizontal .woocommerce-MyAccount-navigation li {
    margin-bottom: 0;
}

/* User Header */
.wap-user-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.wap-user-avatar img {
    border-radius: 50%;
    display: block;
}

.wap-user-info {
    flex: 1;
}

.wap-welcome-text {
    margin: 0 0 5px;
    font-size: 14px;
    color: #666;
}

.wap-user-name {
    margin: 0 0 5px;
    font-size: 24px;
    font-weight: 600;
}

.wap-user-email {
    margin: 0;
    font-size: 14px;
    color: #999;
}

/* Navigation */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation li {
    margin-bottom: 5px;
}

.woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.woocommerce-MyAccount-navigation li a:hover {
    transform: translateX(3px);
}

/* Navigation Icons */
.wap-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wap-nav-icon.position-left {
    margin-right: 10px;
}

.wap-nav-icon.position-right {
    margin-left: 10px;
    order: 2;
}

.wap-nav-icon.position-top {
    flex-direction: column;
    margin-bottom: 5px;
}

.woocommerce-MyAccount-navigation li a .wap-nav-icon.position-top {
    display: block;
    text-align: center;
}

/* Dashboard Content */
.woocommerce-MyAccount-content {
    background: #fff;
}

/* Tables */
.woocommerce-MyAccount-content table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-MyAccount-content table thead {
    background: #f5f5f5;
}

.woocommerce-MyAccount-content table th,
.woocommerce-MyAccount-content table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.woocommerce-MyAccount-content table tbody tr {
    transition: background 0.3s ease;
}

.woocommerce-MyAccount-content table tbody tr:hover {
    background: #f9f9f9;
}

/* Buttons in Content */
.woocommerce-MyAccount-content .button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.woocommerce-MyAccount-content .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Addresses */
.woocommerce-MyAccount-content .woocommerce-Addresses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.woocommerce-MyAccount-content .woocommerce-Address {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .wap-dashboard-wrapper.layout-vertical {
        flex-direction: column;
    }
    
    .wap-dashboard-wrapper.layout-vertical .woocommerce-MyAccount-navigation {
        flex: 1 1 auto;
        width: 100%;
    }
    
    .wap-dashboard-wrapper.layout-horizontal .woocommerce-MyAccount-navigation ul {
        flex-direction: column;
    }
    
    .wap-user-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Woo Account Pro Styles */
.wap-container {
    margin: 0 auto;
    box-sizing: border-box;
}

.wap-row {
    margin-bottom: 15px;
}

.wap-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.wap-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wap-input:focus {
    border-color: #333;
    outline: none;
}

.wap-button {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.wap-button:hover {
    opacity: 0.9;
}

.wap-links {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

.wap-links a {
    color: #333;
    text-decoration: none;
}

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

.wap-user-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.wap-user-header img {
    border-radius: 50%;
}

.wap-user-header h3 {
    margin: 0 0 5px;
}

.wap-user-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Dashboard Layouts */
.wap-dashboard {
    width: 100%;
}

.wap-layout-vertical {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.wap-layout-vertical .woocommerce-MyAccount-navigation {
    flex: 0 0 250px;
}

.wap-layout-vertical .woocommerce-MyAccount-content {
    flex: 1;
    min-width: 300px;
}

.wap-layout-horizontal .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
    margin-bottom: 20px;
}

.wap-layout-horizontal .woocommerce-MyAccount-navigation li {
    margin-bottom: 0;
}

/* Navigation Styling */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation li {
    margin-bottom: 5px;
}

.woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Tables in Content */
.woocommerce-MyAccount-content table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-MyAccount-content table th,
.woocommerce-MyAccount-content table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.woocommerce-MyAccount-content table thead {
    font-weight: 600;
}

/* Buttons in Content */
.woocommerce-MyAccount-content .button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.woocommerce-MyAccount-content .button:hover {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .wap-layout-vertical {
        flex-direction: column;
    }
    
    .wap-layout-vertical .woocommerce-MyAccount-navigation {
        flex: 1 1 100%;
    }
    
    .wap-layout-horizontal .woocommerce-MyAccount-navigation ul {
        flex-direction: column;
        gap: 5px;
    }
}
