/* login-style.css - Design Refinement (Black Buttons) */

/* Reset and base styles */
body.login,
body.rtcl-account {
    background-color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

#login,
.rtcl-login-form-wrap {
    width: 100%;
    max-width: 480px;
    /* Slightly wider for better spacing */
    padding: 0 15px;
    margin: 0 auto;
}

/* ===== Phone-Based Authentication Styles (Main) ===== */

.phone-auth-container {
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    /* Softer, deeper shadow */
    margin-bottom: 25px;
    text-align: center;
}

.phone-auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.phone-auth-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0 0 30px 0;
    font-weight: 400;
}

.phone-auth-subtitle strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.phone-country-code {
    width: 90px;
    height: 52px;
    padding: 0 12px;
    border: 1px solid #ddd;
    /* Thinner, cleaner border */
    border-radius: 6px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
    color: #333;
    appearance: none;
    /* Make it look like a box */
    -webkit-appearance: none;
    text-align: center;
    background-image: none;
    /* Remove default arrow if possible */
}

.phone-number-input {
    flex: 1;
    height: 52px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    color: #333;
    transition: all 0.2s ease;
}

.phone-number-input::placeholder {
    color: #999;
}

.phone-number-input:focus,
.phone-country-code:focus {
    outline: none;
    border-color: #000;
    /* Black focus */
    box-shadow: 0 0 0 1px #000;
}

/* OTP Input */
.otp-input {
    width: 100%;
    height: 60px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 28px;
    text-align: center;
    letter-spacing: 12px;
    margin-bottom: 25px;
    font-weight: 600;
    color: #333;
}

.otp-input:focus {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
    outline: none;
}

/* Registration Form */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.register-input {
    height: 52px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.register-input:focus {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
    outline: none;
}

/* Primary Button (BLACK) */
.phone-auth-btn {
    width: 100%;
    height: 52px;
    background: #000000;
    /* BLACK */
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-auth-btn:hover:not(:disabled) {
    background: #333333;
    /* Dark Grey hover */
    transform: translateY(-1px);
}

.phone-auth-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Links */
.phone-auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 14px;
}

.phone-auth-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
}

.phone-auth-links a:hover {
    color: #000;
    text-decoration: underline;
}

/* Divider */
.phone-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: #999;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.phone-auth-divider::before,
.phone-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.phone-auth-divider span {
    padding: 0 15px;
    font-weight: 500;
}

/* Social Buttons */
.ikman-social-login,
.phone-auth-alternatives {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    position: relative;
    text-decoration: none;
}

.social-btn:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

/* Google Button */
.google-btn {
    color: #444;
    background: #fff;
}

/* Facebook Button (Blue) */
.facebook-btn {
    background: #1877F2 !important;
    color: white !important;
    border-color: #1877F2 !important;
}

.facebook-btn:hover {
    background: #166FE5 !important;
}

/* Email Button (Black) */
.email-btn {
    background: #000000 !important;
    color: white !important;
    border-color: #000000 !important;
}

.email-btn:hover {
    background: #333333 !important;
    border-color: #333333 !important;
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

/* Footer */
.phone-auth-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: #888;
    line-height: 1.5;
}

.footer-links {
    margin-top: 5px;
}

.footer-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

/* Error/Success Messages */
.phone-auth-error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
    display: none;
}

/* Hide WordPress Default Junk */
.rentmycar-mobile-login-page .breadcrumb-wrapper,
.rentmycar-mobile-login-page .page-header,
.rentmycar-mobile-login-page .rtcl-page-title,
.rentmycar-mobile-login-page .entry-header,
.rentmycar-mobile-login-page .theme-banner,
.rentmycar-mobile-login-page .main-breadcrumb,
.rentmycar-mobile-login-page header.entry-header,
.rentmycar-mobile-login-page #login h1 {
    display: none !important;
}

/* Hide Header Search on Mobile for this page */
/* Hide Header Search on Mobile for this page */
@media (max-width: 768px) {

    .rentmycar-mobile-login-page .site-header .search-form-wrap,
    .rentmycar-mobile-login-page .site-header .rtcl-widget-search,
    .rentmycar-mobile-login-page .site-header form.search-form,
    .rentmycar-mobile-login-page .rtcl-search-container,
    .rentmycar-mobile-login-page .header-search-wrap,
    .rentmycar-mobile-login-page .rtcl-search-form-wrap,
    .rentmycar-mobile-login-page .rtin-search-area {
        display: none !important;
    }
}

/* Layout overrides for My Account Page */
.rentmycar-mobile-login-page .rtcl-MyAccount-wrap {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Responsive */
@media (max-width: 480px) {

    #login,
    .rtcl-login-form-wrap {
        padding: 0 40px !important;
    }

    .phone-auth-container {
        padding: 30px 20px;
    }

    .phone-auth-title {
        font-size: 22px;
    }

    .phone-input-group {
        gap: 10px;
    }

    .phone-country-code {
        width: 80px;
        font-size: 16px;
        /* Ensure country code is 16px */
    }

    .phone-number-input::placeholder {
        font-size: 16px;
        /* Force placeholder to match */
    }
}

/* ikman.lk Phone Login Section */
.ikman-phone-login-section {
    background: #fff;
    padding: 30px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.ikman-login-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

.ikman-phone-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ikman-country-code {
    width: 90px;
    height: 50px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
}

.ikman-phone-input {
    flex: 1;
    height: 50px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
}

.ikman-phone-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.ikman-continue-btn {
    width: 100%;
    height: 50px;
    background: #00a49f;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.ikman-continue-btn:hover {
    background: #008c88;
}

.ikman-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.ikman-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #ddd;
}

.ikman-divider span {
    background: #fff;
    padding: 0 15px;
    position: relative;
    color: #999;
    font-size: 14px;
}

/* Email/Password Section (Hidden by default) */
.ikman-email-login-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.ikman-email-login-section .rtcl-form-group,
.ikman-email-login-section .woocommerce-form-row,
.ikman-email-login-section p {
    margin-bottom: 15px;
}

.ikman-email-login-section input[type="text"],
.ikman-email-login-section input[type="password"],
.ikman-email-login-section input[type="email"],
.ikman-email-login-section .rtcl-form-control {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.ikman-email-login-section input:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Social Login Buttons */
.ikman-social-login {
    background: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ikman-social-btn {
    width: 100%;
    height: 50px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.ikman-social-btn:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

.ikman-google-btn {
    color: #333;
}

.ikman-facebook-btn {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.ikman-facebook-btn:hover {
    background: #166fe5;
    border-color: #166fe5;
}

.ikman-email-toggle-btn {
    background: #fff;
    color: #00a49f;
    border: 1px solid #00a49f;
}

.ikman-email-toggle-btn:hover {
    background: #00a49f;
    color: #fff;
}

/* Submit button styling when shown */
.rtcl-login-form-submit-wrap button[type="submit"],
p.submit .button-primary,
.woocommerce-form-login button.button {
    width: 100%;
    height: 50px;
    background: #00a49f;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    #login,
    .rtcl-login-form-wrap {
        max-width: 100%;
        padding: 0 15px;
    }

    .ikman-phone-login-section,
    .ikman-email-login-section,
    .ikman-social-login {
        padding: 20px 15px;
    }

    .ikman-login-title {
        font-size: 16px;
    }
}

/* Hide default WordPress login styles */
.login form {
    box-shadow: none;
    border: none;
    padding: 0;
    background: transparent;
}

.login #login h1 {
    margin-bottom: 20px;
}

/* Additional cleanup */
.login .message,
.login #login_error {
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

/* Fix password field interaction */
.ikman-email-login-section .rtcl-user-pass-wrap,
.ikman-email-login-section .rtcl-form-control {
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

.ikman-email-login-section input[type="password"] {
    pointer-events: auto !important;
    cursor: text !important;
}

/* Ensure toggle icon doesn't block input */
.ikman-email-login-section .rtcl-toggle-pass {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 2;
    pointer-events: auto;
}

/* WordPress Login Page Specific Fixes */
.login #loginform input[type="text"],
.login #loginform input[type="password"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
    cursor: text !important;
}

.login #loginform p {
    width: 100%;
    box-sizing: border-box;
}

.login #loginform {
    width: 100%;
    max-width: 100%;
}

/* Force password field to be interactive - aggressive fix */
.login #user_pass,
.login input[type="password"] {
    pointer-events: auto !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
    cursor: text !important;
    position: relative !important;
    z-index: 999 !important;
    background: white !important;
}

.login #user_pass:focus,
.login input[type="password"]:focus {
    outline: 2px solid #4a90e2 !important;
    border-color: #4a90e2 !important;
}

/* Ensure no overlays on password wrapper */
.login .user-pass-wrap,
.login p:has(#user_pass) {
    position: relative !important;
    pointer-events: auto !important;
    z-index: 1 !important;
}

/* ===== Phone-Based Authentication Styles ===== */

.phone-auth-container {
    background: #fff;
    padding: 30px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.phone-auth-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
    text-align: center;
}

.phone-auth-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0 0 25px 0;
    text-align: center;
}

.phone-auth-subtitle strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Phone Input */
.phone-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.phone-country-code {
    width: 100px;
    height: 50px;
    padding: 0 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.phone-country-code:focus {
    outline: none;
    border-color: #00a49f;
}

.phone-number-input {
    flex: 1;
    height: 50px;
    padding: 0 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.phone-number-input:focus {
    outline: none;
    border-color: #00a49f;
}

/* OTP Input */
.otp-input {
    width: 100%;
    height: 60px;
    padding: 0 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.otp-input:focus {
    outline: none;
    border-color: #00a49f;
}

/* Registration Form */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.register-input {
    height: 50px;
    padding: 0 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.register-input:focus {
    outline: none;
    border-color: #00a49f;
}

/* Buttons */
.phone-auth-btn {
    width: 100%;
    height: 50px;
    background: #00a49f;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.phone-auth-btn:hover:not(:disabled) {
    background: #008f86;
}

.phone-auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.phone-auth-btn .btn-loader {
    display: none;
}

/* Links */
.phone-auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 14px;
}

.phone-auth-links a {
    color: #00a49f;
    text-decoration: none;
    transition: color 0.3s;
}

.phone-auth-links a:hover {
    color: #008f86;
    text-decoration: underline;
}

/* Error Messages */
.phone-auth-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
}

/* Divider */
.phone-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: #95a5a6;
    font-size: 14px;
}

.phone-auth-divider::before,
.phone-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.phone-auth-divider span {
    padding: 0 15px;
}

/* Alternative Login */
.phone-auth-alternatives {
    text-align: center;
}

.phone-alt-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #fff;
    border: 2px solid #00a49f;
    color: #00a49f;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.phone-alt-btn:hover {
    background: #00a49f;
    color: #fff;
}

/* Responsive */
@media (max-width: 480px) {
    .phone-auth-container {
        padding: 25px 20px;
    }

    .phone-auth-title {
        font-size: 20px;
    }

    .phone-input-group {
        flex-direction: column;
    }

    .phone-country-code {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .phone-input-group {
        flex-direction: column;
    }

    .phone-country-code {
        width: 100%;
        margin-bottom: 10px;
    }

    .phone-number-input {
        width: 100%;
    }

    body.page-id-8:not(.logged-in) .rtcl-MyAccount-wrap,
    body.rtcl.rtcl-myaccount:not(.logged-in) .rtcl-MyAccount-wrap {
        padding: 30px 20px !important;
    }

    body.page-id-8:not(.logged-in) .site-content,
    body.rtcl.rtcl-myaccount:not(.logged-in) .site-content {
        max-width: 100%;
        margin: 20px auto;
    }
}

/* Social Login Buttons */
.social-btn {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    background: white;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn svg {
    flex-shrink: 0;
}

.google-btn {
    color: #333;
    border-color: #ddd;
}

.google-btn:hover {
    border-color: #4285F4;
    background: #f8f9fa;
}

.facebook-btn {
    background: #1877F2 !important;
    color: white !important;
    border-color: #1877F2 !important;
}

.facebook-btn:hover {
    background: #166FE5 !important;
    border-color: #166FE5 !important;
}

.email-btn {
    background: #00a49f !important;
    color: white !important;
    border-color: #00a49f !important;
}

.email-btn:hover {
    background: #008f86 !important;
    border-color: #008f86 !important;
}

/* Footer */
.phone-auth-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

.phone-auth-footer p {
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-links a {
    color: #00a49f;
    text-decoration: none;
}

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

.footer-links span {
    color: #ccc;
}

/* Center Login Section and Hide Breadcrumb/Banner */
/* Center Login Section and Hide Breadcrumb/Banner */
.rentmycar-mobile-login-page .site-content,
body.rtcl.rtcl-myaccount:not(.logged-in) .site-content {
    max-width: 650px;
    margin: 10px auto;
    padding: 0 20px;
}

.rentmycar-mobile-login-page .breadcrumb-wrapper,
.rentmycar-mobile-login-page .page-header,
.rentmycar-mobile-login-page .rtcl-page-title,
.rentmycar-mobile-login-page .entry-header,
.rentmycar-mobile-login-page .theme-banner,
.rentmycar-mobile-login-page .main-breadcrumb,
body.rtcl.rtcl-myaccount:not(.logged-in) .breadcrumb-wrapper,
body.rtcl.rtcl-myaccount:not(.logged-in) .page-header,
body.rtcl.rtcl-myaccount:not(.logged-in) .rtcl-page-title,
body.rtcl.rtcl-myaccount:not(.logged-in) .entry-header,
body.rtcl.rtcl-myaccount:not(.logged-in) .theme-banner,
body.rtcl.rtcl-myaccount:not(.logged-in) .main-breadcrumb {
    display: none !important;
}

.rentmycar-mobile-login-page .rtcl-MyAccount-wrap,
body.rtcl.rtcl-myaccount:not(.logged-in) .rtcl-MyAccount-wrap {
    background: white;
    padding: 50px 60px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Remove sidebar on login page */
.rentmycar-mobile-login-page .widget-area,
.rentmycar-mobile-login-page aside,
body.rtcl.rtcl-myaccount:not(.logged-in) .widget-area,
body.rtcl.rtcl-myaccount:not(.logged-in) aside {
    display: none !important;
}

.rentmycar-mobile-login-page .content-area,
body.rtcl.rtcl-myaccount:not(.logged-in) .content-area {
    width: 100% !important;
    max-width: 100% !important;
}

/* Hide duplicate Google login button from other plugins */
.rentmycar-mobile-login-page .mo_openid_app_icons_list,
.rentmycar-mobile-login-page .mo_openid_app_icons_list_vertical {
    display: none !important;
}