/**
 * Account Modal Styling
 */

/* Modal Base */
.account-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.account-modal.show {
    opacity: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px; /* Distance from the top */
}

/* Modal Content */
.account-modal-content {
    background-color: #fff;
    margin: 0 auto;
    border-radius: 4px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalopen 0.4s;
}

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

/* Close Button */
.account-modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 2;
}

.account-modal-close:hover {
    color: #000;
}

/* Modal Title */
.account-modal-title {
    padding: 20px 30px;
    margin: 0;
    font-size: 24px;
    border-bottom: 1px solid #eee;
    font-weight: 500;
    text-align: center;
}

/* Container for two columns */
.account-modal-container {
    display: flex;
    min-height: 400px;
}

/* Left Column (Forms) */
.account-modal-left {
    flex: 1;
    padding: 30px;
    border-right: 1px solid #eee;
}

/* Right Column (Images) */
.account-modal-right {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Form Tabs */
.account-modal-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    width: 100%;
}

.account-modal-tab {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s, border-bottom 0.2s;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    color: #666;
    flex: 1; /* Make tabs equal width */
    text-align: center;
}

.account-modal-tab:hover {
    color: #000;
}

.account-modal-tab.active {
    border-bottom: 2px solid #d38368;
    color: #000;
}

/* Tab Content - Default shared styles */
.account-modal-tabcontent {
    display: none;
}

/* Login Tab - No scrolling */
#login-tab {
    overflow: visible;
}

/* Signup Tab - With scrolling if needed */
#signup-tab {
    height: 350px;
    overflow-y: auto;
    padding-right: 5px;
}

.account-modal-tabcontent.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* Form Styling */
.account-modal-tabcontent form {
    margin: 0;
}

.account-modal-tabcontent label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.account-modal-tabcontent input[type="text"],
.account-modal-tabcontent input[type="password"],
.account-modal-tabcontent input[type="email"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    height: 38px;
    line-height: normal;
}

/* Button Styling */
.account-modal-tabcontent .woocommerce-button.button,
.account-modal-tabcontent .woocommerce-Button.button {
    background-color: #d38368;
    color: white;
    border: none;
    padding: 8px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.account-modal-tabcontent .woocommerce-button.button:hover,
.account-modal-tabcontent .woocommerce-Button.button:hover {
    background-color: #c27258;
}

/* Remember me and Lost password */
.woocommerce-LostPassword.lost_password {
    margin-top: 5px;
    font-size: 14px;
}

/* Ensure the newsletter checkbox row is more compact */
.account-modal-tabcontent .form-row label.woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.account-modal-tabcontent .form-row label.woocommerce-form__label-for-checkbox input {
    margin-right: 8px;
    height: auto;
}

/* Reduce height of between-field spacing */
.woocommerce-form-row {
    margin-bottom: 12px;
}

/* Login button positioning */
#login-tab .form-row {
    display: block;
    width: 100%;
    margin-bottom: 15px;
}

/* Images in right column */
.account-modal-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-size: cover;
    background-position: center;
}

.account-modal-image.active {
    opacity: 1;
}

.login-image {
    background-image: url('http://mieganamslocal.local/wp-content/uploads/2025/04/j-tempur-matracis-spilvens-1l-1.jpg');
}

.signup-image {
    background-image: url('http://mieganamslocal.local/wp-content/uploads/2025/04/pexels-photo-4045539-2.webp');
}

/* Customer card optional field */
.account-modal-tabcontent span.description {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: -5px;
    margin-bottom: 12px;
    font-style: italic;
}

/* Form Error and Success Messages */
.form-error-message,
.form-success-message {
    font-size: 13px;
    padding: 8px;
    margin-bottom: 12px;
    border-radius: 4px;
    display: none;
}

.form-error-message {
    color: #e74c3c;
    background-color: #fde8e7;
}

.form-success-message {
    color: #27ae60;
    background-color: #e8f8f0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .account-modal-container {
        flex-direction: column;
    }
    
    .account-modal-right {
        display: none;
    }
    
    .account-modal-left {
        border-right: none;
    }
    
    .account-modal-content {
        width: 95%;
    }
} 