/* Custom Login Form Styles for WooCommerce My Account and Standalone Pages */

.woocommerce-account .login-container,
.page-template-page-login .login-container,
.page-template-page-register .register-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.woocommerce-account .login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

/* Override WooCommerce default styles */
.woocommerce-account .woocommerce-Input.form-control {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: #fff;
}

.woocommerce-account .woocommerce-Input.form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Tab styles */
.woocommerce-account .login-tabs {
    margin-bottom: 20px;
}

.woocommerce-account .tab-buttons {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.woocommerce-account .tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.woocommerce-account .tab-btn:hover {
    color: #007cba;
    background: #f8f9fa;
}

.woocommerce-account .tab-btn.active {
    color: #007cba;
    border-bottom-color: #007cba;
    background: #f8f9fa;
}

.woocommerce-account .tab-content {
    display: none;
}

.woocommerce-account .tab-content.active {
    display: block;
}

/* Phone input styles */
.woocommerce-account .phone-input-container {
    display: flex;
    gap: 10px;
}

.woocommerce-account .phone-prefix {
    flex: 0 0 180px;
    min-width: 180px;
}

.woocommerce-account .phone-number {
    flex: 1;
}

/* Button styles */
.woocommerce-account .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
    width: 100%;
}

.woocommerce-account .btn-primary {
    background: #007cba;
    color: white;
}

.woocommerce-account .btn-primary:hover:not(:disabled) {
    background: #005a87;
    color: white;
}

.woocommerce-account .btn-outline-primary {
    background: transparent;
    color: #007cba;
    border: 2px solid #007cba;
}

.woocommerce-account .btn-outline-primary:hover {
    background: #007cba;
    color: white;
    text-decoration: none;
}

.woocommerce-account .create-account-btn {
    font-size: 16px;
    padding: 15px 30px;
    font-weight: 600;
}

/* Form group styles */
.woocommerce-account .form-group {
    margin-bottom: 20px;
}

.woocommerce-account .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

/* Checkbox styles */
.woocommerce-account .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.woocommerce-account .checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

/* Alert styles */
.woocommerce-account .alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.woocommerce-account .alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.woocommerce-account .alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Create account section */
.woocommerce-account .create-account-section {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.woocommerce-account .create-account-section p {
    margin-bottom: 15px;
    color: #666;
}

/* Hide default WooCommerce registration */
.woocommerce-account .u-column2 {
    display: none !important;
}

.woocommerce-account .u-columns.col2-set .u-column1 {
    width: 100% !important;
    float: none !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .woocommerce-account .login-container {
        padding: 20px;
        margin: 10px;
        min-width: auto;
        max-width: 100%;
    }

    .woocommerce-account .tab-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .woocommerce-account .phone-input-container {
        flex-direction: column;
        gap: 10px;
    }

    .woocommerce-account .phone-prefix {
        flex: none;
        min-width: auto;
    }
}

/* Override Flatsome theme styles if needed */
.woocommerce-account .woocommerce-form-login {
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
}

.woocommerce-account .woocommerce-form-login .form-row {
    margin-bottom: 20px;
}

/* Ensure proper spacing */
.woocommerce-account .woocommerce-LostPassword {
    text-align: center;
    margin-top: 15px;
}

.woocommerce-account .woocommerce-LostPassword a {
    color: #007cba;
    text-decoration: none;
}

.woocommerce-account .woocommerce-LostPassword a:hover {
    text-decoration: underline;
}

/* 
Styles for standalone login and register pages */
.page-template-page-login .login-tabs,
.page-template-page-register .login-tabs {
    margin-bottom: 20px;
}

.page-template-page-login .tab-buttons,
.page-template-page-register .tab-buttons {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.page-template-page-login .tab-btn,
.page-template-page-register .tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.page-template-page-login .tab-btn:hover,
.page-template-page-register .tab-btn:hover {
    color: #007cba;
    background: #f8f9fa;
}

.page-template-page-login .tab-btn.active,
.page-template-page-register .tab-btn.active {
    color: #007cba;
    border-bottom-color: #007cba;
    background: #f8f9fa;
}

.page-template-page-login .tab-content,
.page-template-page-register .tab-content {
    display: none;
}

.page-template-page-login .tab-content.active,
.page-template-page-register .tab-content.active {
    display: block;
}

.page-template-page-login .phone-input-container,
.page-template-page-register .phone-input-container {
    display: flex;
    gap: 10px;
}

.page-template-page-login .phone-prefix,
.page-template-page-register .phone-prefix {
    flex: 0 0 180px;
    min-width: 180px;
}

.page-template-page-login .phone-number,
.page-template-page-register .phone-number {
    flex: 1;
}

/* Register page specific styles */
.page-template-page-register .form-row {
    display: flex;
    gap: 15px;
}

.page-template-page-register .col-md-6 {
    flex: 1;
}

.page-template-page-register .form-group {
    margin-bottom: 20px;
}

.page-template-page-register .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.page-template-page-register .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 44px;
}

/* Special styling for select elements */
.page-template-page-register select.form-control {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    line-height: 1.5;
}

.page-template-page-register .form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.page-template-page-register .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
    box-sizing: border-box;
}

.page-template-page-register .btn-primary {
    background: #007cba;
    color: white;
}

.page-template-page-register .btn-primary:hover:not(:disabled) {
    background: #005a87;
}

.page-template-page-register .btn-secondary {
    background: #6c757d;
    color: white;
}

.page-template-page-register .btn-secondary:hover {
    background: #545b62;
}

.page-template-page-register .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.page-template-page-register .required {
    color: #e74c3c;
}

.page-template-page-register .alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.page-template-page-register .alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.page-template-page-register .alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.page-template-page-register .text-center {
    text-align: center;
    margin-top: 20px;
}

.page-template-page-register .entry-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

/* Error message styling for better visibility */
.alert-error a {
    color: inherit;
    font-weight: bold;
    text-decoration: underline;
}

.alert-error a:hover {
    text-decoration: none;
}

/* Responsive adjustments for standalone pages */
@media (max-width: 768px) {
    .page-template-page-login .login-container,
    .page-template-page-register .register-container {
        padding: 20px 15px;
        margin: 10px;
        max-width: 100%;
        min-width: auto;
        border-radius: 6px;
        box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    }

    .page-template-page-login .phone-input-container,
    .page-template-page-register .phone-input-container {
        flex-direction: column;
        gap: 10px;
    }

    .page-template-page-login .phone-prefix,
    .page-template-page-register .phone-prefix {
        flex: none;
        min-width: auto;
        width: 100%;
    }

    .page-template-page-login .phone-number,
    .page-template-page-register .phone-number {
        width: 100%;
    }

    .page-template-page-login .tab-btn,
    .page-template-page-register .tab-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .page-template-page-register .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .page-template-page-register .col-md-6 {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .page-template-page-register .form-control {
        padding: 14px 12px;
        font-size: 16px;
        border-radius: 6px;
        min-height: 48px;
        line-height: 1.4;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .page-template-page-register select.form-control {
        padding: 14px 40px 14px 12px;
        background-position: right 12px center;
        background-size: 18px;
        line-height: 1.4;
    }
    
    .page-template-page-register .btn {
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 6px;
        width: 100%;
    }
    
    .page-template-page-register .entry-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .page-template-page-register .form-group {
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .page-template-page-register .register-container {
        padding: 15px 10px;
        margin: 5px;
        border-radius: 0;
    }
    
    .page-template-page-register .entry-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .page-template-page-register .form-control {
        padding: 12px 10px;
        font-size: 16px;
    }
    
    .page-template-page-register .btn {
        padding: 12px 16px;
        font-size: 16px;
        min-height: 48px;
    }
}