/* Custom Login Modal Styles */

/* Custom Modal Overlay */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 20px;
}

.custom-modal-content {
    position: relative;
    background: transparent;
}

.custom-modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.custom-modal-close:hover {
    background: #f5f5f5;
}

/* Modal Overlay Background - Handled by Magento Modal container, but we style the inner content */
.custom-login-modal-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Login Card */
.custom-login-modal-wrapper .login-card,
.custom-modal-overlay .login-card {
    background-color: #ffffff;
    width: 100%;
    /* max-width is handled by modal width usually, but we can enforce it if needed */
    padding: 30px;
    /* Padding for modal */
    border-radius: 8px;
    text-align: left;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Card Title */
.custom-login-modal-wrapper .card-title {
    font-size: 20px;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    color: #333;
    display: block;
    /* Ensure it takes full width */
}

/* Form Groups */
.custom-login-modal-wrapper .form-group {
    margin-bottom: 20px;
}

.custom-login-modal-wrapper label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Input Controls */
.custom-login-modal-wrapper .input-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fcfcfc;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    height: auto;
    /* Override default Magento input height if needed */
}

.custom-login-modal-wrapper .input-control:focus {
    border-color: #777;
    background-color: #fff;
}

/* Remember Me Row */
.custom-login-modal-wrapper .remember-row {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.custom-login-modal-wrapper .remember-row input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-top: 0;
    /* Fix vertical alignment */
}

.custom-login-modal-wrapper .remember-row label {
    margin-bottom: 0;
    cursor: pointer;
    color: #555;
    font-size: 14px;
    display: inline-block;
}

/* Login Button */
.custom-login-modal-wrapper .btn-login {
    width: 100%;
    background-color: #232f3e;
    color: white;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 20px;
    height: auto;
    line-height: normal;
}

.custom-login-modal-wrapper .btn-login:hover {
    background-color: #111827;
}

/* Links */
.custom-login-modal-wrapper .forgot-link {
    display: block;
    text-align: center;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    margin-bottom: 25px;
}

.custom-login-modal-wrapper .forgot-link:hover {
    text-decoration: underline;
}

.custom-login-modal-wrapper .signup-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    display: block;
}

.custom-login-modal-wrapper .signup-text a {
    color: #232f3e;
    font-weight: 600;
    text-decoration: underline;
}

/* Magento Override Fixes */
.modal-popup.popup-authentication .modal-inner-wrap {
    max-width: 450px !important;
    /* Force the width from design */
    background: transparent !important;
    box-shadow: none !important;
}

/* Hide the default modal header completely */
.modal-popup.popup-authentication .modal-header {
    display: none !important;
}

/* Remove default modal content padding and styling */
.modal-popup.popup-authentication .modal-content {
    padding: 0 !important;
    background: transparent !important;
}

/* Remove default modal footer */
.modal-popup.popup-authentication .modal-footer {
    display: none !important;
}

/* Ensure our custom template wrapper displays properly */
.block-authentication.custom-login-modal-wrapper {
    display: block !important;
    background: transparent !important;
}

/* Hide the "Checkout as new customer" block in header login popup */
.modal-popup.popup-authentication .block-new-customer {
    display: none !important;
}

/* Style the login card to be the complete modal */
.modal-popup.popup-authentication .login-card {
    width: 100%;
    max-width: 100%;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Ensure block-customer-login has no extra styling */
.modal-popup.popup-authentication .block-customer-login {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
/* Apply styles to custom modal elements */
.custom-modal-overlay .card-title {
    font-size: 20px;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    color: #333;
}

.custom-modal-overlay .form-group {
    margin-bottom: 20px;
}

.custom-modal-overlay label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.custom-modal-overlay .input-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fcfcfc;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.custom-modal-overlay .input-control:focus {
    border-color: #777;
    background-color: #fff;
}

.custom-modal-overlay .remember-row {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.custom-modal-overlay .remember-row input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.custom-modal-overlay .remember-row label {
    margin-bottom: 0;
    cursor: pointer;
    color: #555;
    font-size: 14px;
}

.custom-modal-overlay .btn-login {
    width: 100%;
    background-color: #232f3e;
    color: white;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 20px;
}

.custom-modal-overlay .btn-login:hover {
    background-color: #111827;
}

.custom-modal-overlay .forgot-link {
    display: block;
    text-align: center;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    margin-bottom: 25px;
}

.custom-modal-overlay .forgot-link:hover {
    text-decoration: underline;
}

.custom-modal-overlay .signup-text {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.custom-modal-overlay .signup-text a {
    color: #232f3e;
    font-weight: 600;
    text-decoration: underline;
}
