﻿/* ============================================================
   AYURCALL LOGIN PAGE — Unified Coral 2025
   Final Production Build · Oct 2025
=========================================================== */

/* ------------------------------------------------------------
   DESIGN TOKENS
------------------------------------------------------------ */
:root {
    --coral-500: #ff6f61;
    --coral-600: #e9534f;
    --coral-light: #ffeae6;
    --neutral-900: #222;
    --neutral-700: #444;
    --neutral-600: #666;
    --neutral-400: #999;
    --radius-md: 8px;
    --radius-lg: 14px;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 6px 14px rgba(0, 0, 0, 0.1);
    --font-main: "Poppins", "Nunito", sans-serif;
}

/* ------------------------------------------------------------
   GLOBAL BASE
------------------------------------------------------------ */
body {
    font-family: var(--font-main);
    background-color: #fff;
    color: var(--neutral-900);
    margin: 0;
    padding: 0;
}

/* ------------------------------------------------------------
   LAYOUT
------------------------------------------------------------ */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
}

.login-image {
    background-color: var(--coral-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .login-image img {
        width: 80%;
        max-width: 420px;
        border-radius: var(--radius-lg);
        object-fit: cover;
        box-shadow: var(--shadow-lg);
    }

/* ------------------------------------------------------------
   FORM PANEL
------------------------------------------------------------ */
.login-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 4rem;
}

.login-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.4rem;
}


.login-subtitle {
    color: var(--neutral-600);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

/* ------------------------------------------------------------
   INPUTS
------------------------------------------------------------ */
input[type="tel"],
.otp-input {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1rem;
    background: #fff;
}

    input[type="tel"]:focus,
    .otp-input:focus {
        border-color: var(--coral-500);
        box-shadow: 0 0 0 2px rgba(255, 111, 97, 0.15);
    }

/* ------------------------------------------------------------
   MOBILE NUMBER INPUT + SEND OTP — PERFECT ALIGNMENT
------------------------------------------------------------ */
#mobileForm {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
}

    #mobileForm input[type="tel"],
    #mobileForm #btnSendOtp {
        width: 100%;
        height: 44px; /* reduced from 48px → tighter and equal */
        border-radius: var(--radius-md);
        font-size:1rem;
    }

    #mobileForm input[type="tel"] {
        margin-bottom: 0.75rem;
        padding: 0 0.9rem; /* horizontal padding only */
        line-height: 44px; /* vertically centers text */
        box-sizing: border-box;
        height: 44px;
    }


/* ------------------------------------------------------------
   OTP SECTION
------------------------------------------------------------ */
.otp-heading {
    font-size: 0.95rem;
    color: var(--neutral-600);
    margin-bottom: 1rem;
/*    text-align: center;*/
}

.otp-input-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 0.6rem;
    max-width: 360px;
}

.otp-input {
    width: 55px;
    height: 60px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid #ccc;
    border-radius: var(--radius-md);
}

.otp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--neutral-600);
    margin-bottom: 1.25rem;
}

/* ------------------------------------------------------------
   BUTTONS
------------------------------------------------------------ */
.btn-primary {
    background-color: var(--coral-500);
    color: #fff;
    font-weight: 600;
    border: none;
    height: 44px; /* ensures consistent height */
    display: flex; /* center with flexbox */
    align-items: center; /* vertical center */
    justify-content: center; /* horizontal center */
    padding: 0; /* reset extra padding */
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.15s ease;
}


.btn-link {
    background: none;
    border: none;
    color: var(--coral-500);
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.6rem;
    text-decoration: none;
    transition: color 0.2s ease;
}


    .btn-link.hidden {
        display: none;
    }

/* ------------------------------------------------------------
   MESSAGES & STATES
------------------------------------------------------------ */
.login-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--neutral-700);
/*    text-align: center;*/
    min-height: 20px;
}

.form-section {
    display: none;
}

    .form-section.active {
        display: block;
    }

/* ------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------ */
@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .login-image {
        display: none;
    }

    .login-form {
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 1.6rem;
    }

    .otp-input {
        width: 48px;
        height: 54px;
    }

}

@media (max-width: 400px) {
    .otp-input {
        width: 44px;
        height: 50px;
    }

    .login-form {
        padding: 1.75rem;
    }
}

/* ------------------------------------------------------------
   MOBILE — CENTER CONTENT + TOP SPACING
------------------------------------------------------------ */
@media (max-width: 768px) {
    .login-form {
        display: flex;
        flex-direction: column;
        justify-content: center; /* center vertically */
        align-items: center; /* center horizontally */
        min-height: calc(100vh - 80px); /* full viewport height minus header if any */
        padding: 2.5rem 1.5rem 2rem; /* slight more top padding */
        box-sizing: border-box;
        text-align: center; /* better for narrow screens */
    }

    .login-title {
        margin-top: 1.2rem; /* add breathing space above “Welcome to …” */
        margin-bottom: 0.4rem;
    }

    .login-subtitle {
        margin-bottom: 1.8rem;
    }

    #mobileForm,
    #otpForm {
        width: 100%;
        max-width: 340px; /* keep same visual width as desktop proportion */
    }
}
