﻿/* =========================================================
   Login Page Styles – Fully Responsive
   ========================================================= */

/* ================= ROOT ================= */
:root {
    --cliksell-navy: #1b1b1b;
    --cliksell-warm-white: #ffffff;
    --cliksell-slate: #848484;
    --cliksell-gold: #C57673;
    --cliksell-teal: #C57673;
    --cliksell-red: #A14F4C;
}

/* ================= RESETS ================= */
.layout-shell {
    overflow: hidden;
}

.main-content {
    margin-top: 0 !important;
    margin-left: 0 !important;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* ================= PAGE ================= */
.login-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    min-width: 100vw !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem);
    overflow: hidden;
}

    /* Background image layer */
    .login-container::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url("/carousel1.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.06;
        pointer-events: none;
        z-index: 0;
    }

/* ================= WRAPPER ================= */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

/* ================= HEADER ================= */
.login-header {
    text-align: center;
    width: 100%;
}

.login-title {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--cliksell-navy);
    margin: 0;
    line-height: 1.1;
}

    .login-title span {
        font-size: clamp(0.7rem, 2vw, 0.9rem);
        font-weight: 600;
        color: var(--cliksell-slate);
        margin-left: 0.3rem;
        vertical-align: middle;
    }

/* ================= CARD ================= */
.card {
    width: 100%;
    background: #ffffff;
    border-radius: clamp(14px, 3vw, 24px);
    padding: clamp(1.5rem, 5vw, 3rem);
    box-shadow: 0 10px 40px rgba(26, 43, 73, 0.12);
}

.login-card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= SUBTITLE ================= */
.subtitle {
    color: var(--cliksell-slate);
    text-align: center;
    font-size: clamp(0.875rem, 2.5vw, 1.05rem);
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    margin-top: 0;
}

/* ================= FORM GROUPS ================= */
.form-group {
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

    .form-group label {
        color: var(--cliksell-slate);
        font-weight: 600;
        font-size: clamp(0.8rem, 2vw, 0.9rem);
        margin-bottom: 0.5rem;
        display: block;
    }

.form-input {
    width: 100%;
    padding: clamp(0.7rem, 2vw, 0.95rem) clamp(0.8rem, 2vw, 1.1rem);
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: clamp(0.875rem, 2vw, 0.95rem);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

    .form-input:focus {
        border-color: var(--cliksell-navy);
        box-shadow: 0 0 0 3px rgba(26, 43, 73, 0.08);
        outline: none;
    }

/* ================= PASSWORD WRAPPER ================= */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-wrapper .form-input {
        padding-right: 3rem;
    }

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

    .password-toggle:hover {
        color: #374151;
    }

    .password-toggle:focus {
        outline: 2px solid var(--cliksell-navy);
        outline-offset: 2px;
        border-radius: 4px;
    }

    .password-toggle svg {
        width: clamp(16px, 2.5vw, 18px);
        height: clamp(16px, 2.5vw, 18px);
        flex-shrink: 0;
    }

/* ================= CHECKBOX ================= */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
    gap: 0.5rem;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--cliksell-navy);
    cursor: pointer;
}

.checkbox-label {
    font-size: clamp(0.875rem, 2vw, 0.95rem);
    color: var(--cliksell-slate);
    cursor: pointer;
    user-select: none;
}

/* ================= BUTTON ================= */
.btn {
    width: 100%;
    padding: clamp(0.75rem, 2.5vw, 1rem);
    background: var(--cliksell-navy);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

    .btn:hover {
        background: #2d2d2d;
    }

    .btn:active {
        transform: scale(0.98);
    }

/* ================= LINKS ================= */
.links {
    margin-top: clamp(1.25rem, 3vw, 2rem);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.link {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: var(--cliksell-slate);
    text-decoration: none;
    transition: color 0.2s ease;
}

    .link:hover {
        color: var(--cliksell-navy);
    }

.link-primary {
    color: var(--cliksell-navy);
    font-weight: 600;
}

/* ================= ERRORS ================= */
.error-message {
    color: var(--cliksell-red);
    background: rgba(220, 38, 38, 0.08);
    border-left: 4px solid var(--cliksell-red);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.validation-error {
    color: var(--cliksell-red);
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: block;
}

/* ================= RESPONSIVE BREAKPOINTS ================= */

/* Tablet */
@media (max-width: 600px) {
    .login-container {
        padding: 1.25rem 1rem;
        align-items: flex-start;
        padding-top: clamp(2rem, 8vw, 4rem);
    }

    .login-wrapper {
        max-width: 100%;
    }
}

/* Mobile */
@media (max-width: 400px) {
    .card {
        border-radius: 16px;
        padding: 1.5rem 1.25rem;
        box-shadow: 0 6px 24px rgba(26, 43, 73, 0.1);
    }

    .login-title {
        font-size: 1.75rem;
    }

    .form-input {
        font-size: 1rem; /* prevents iOS auto-zoom on focus */
    }

    .btn {
        padding: 0.875rem;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .login-container {
        padding: 1rem 0.75rem;
    }

    .card {
        padding: 1.25rem 1rem;
    }
}

/* Tall phones — vertically center even with keyboard open */
@media (max-height: 700px) and (max-width: 600px) {
    .login-container {
        align-items: flex-start;
        padding-top: 1.5rem;
    }
}
