/* ===================================
   Login Page Styles
   =================================== */

/* Root Variables */
:root {
    --primary-color: #962C50;
    --primary-color-dark: #802544;
    --secondary-color: #6c757d;
    --light-bg: #faf8f0;
    --white: #ffffff;
    --black: #000000;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --gray-dark: #495057;
    --border-radius: 15px;
    --box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --tab-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family-primary: 'Noto Sans Malayalam', sans-serif;
    --font-family-display: 'Dancing Script', cursive;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--black);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

/* Login Container */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);

}

/* Hide image section on mobile by default */
@media (max-width: 991px) {
    .login-image-section {
        display: none !important;
    }
}

/* Left Section - Background Image */
.login-image-section {
    flex: 1;
    background: url('../assets/elegant-floral-centerpiece.jpg') center/cover no-repeat;
    position: relative;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    overflow: hidden;
    min-height: 100vh;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(150, 44, 80, 0.2) 0%, rgba(128, 37, 68, 0.1) 100%);
    display: flex;
    align-items: flex-end;
    padding: 3rem;
}

.image-content {
    color: var(--white);
}

.image-title {
    font-size: 2.5rem;
    font-weight: 300;
    font-family: var(--font-family-display);
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.highlight {
    font-weight: 600;
    color: var(--white);
}

/* Right Section - Login Form */
.login-form-section {
    flex: 1;
    background: #faf8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 100vh;
}

.form-container {
    width: 100%;
    max-width: 450px;
    background: transparent;
    padding: 2rem;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

/* Logo Section */
.logo-section {
    text-align: right;
    margin-bottom: 1rem;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--black);
    margin: 0;
    font-family: var(--font-family-primary);
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-title {
    font-size: 1.8rem;
    font-weight: 500;
    font-family: var(--font-family-display);
    color: var(--black);
    margin-bottom: 0;
}

/* Tab Section */
.tab-section {
    margin-bottom: 2rem;
}

.tab-container {
    display: flex;
    background: rgba(248, 221, 226, 0.3);
    border-radius: 50px;
    padding: 0.25rem;
    gap: 0.25rem;
    position: relative;
    overflow: hidden;
}

.tab-button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--tab-transition);
    position: relative;
    z-index: 2;
    font-family: var(--font-family-primary);
}

.tab-button.active {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(150, 44, 80, 0.3);
    transform: scale(1.02);
}

.tab-button:hover:not(.active) {
    background: rgba(150, 44, 80, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.tab-button:not(.active) {
    background: rgba(248, 221, 226, 0.5);
    color: var(--gray-dark);
}

.tab-button:active {
    transform: scale(0.98);
}

/* Tab button ripple effect */
.tab-button {
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.tab-button:active::before {
    width: 300px;
    height: 300px;
}

/* Smooth tab indicator - Removed bottom border */

/* Description Section */
.description-section {
    text-align: center;
    margin-bottom: 2rem;
}

.description-text {
    color: var(--gray-dark);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
    font-family: var(--font-family-primary);
}

/* Form Styles */
.login-form,
.register-form {
    width: 100%;
    opacity: 1;
    transform: translateX(0);
    transition: var(--tab-transition);
    position: relative;
}

.login-form.tab-hidden,
.register-form.tab-hidden {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

.login-form.tab-active,
.register-form.tab-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    position: relative;
    z-index: 2;
}

/* Form entrance animation */
.login-form,
.register-form {
    animation: form-entrance 0.4s ease-out;
}

@keyframes form-entrance {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab Content Container */
.tab-content-container {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.tab-content-container.transitioning {
    pointer-events: none;
}

.tab-content-container.transitioning::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: tab-spin 0.6s linear infinite;
    z-index: 10;
}

@keyframes tab-spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
    font-family: var(--font-family-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(150, 44, 80, 0.1);
}

.form-control::placeholder {
    color: var(--gray-medium);
}

/* Form helper text */
.form-text {
    font-size: 0.8rem;
    color: var(--gray-medium);
    margin-top: 0.25rem;
    display: block;
    line-height: 1.4;
}

.form-text.text-muted {
    color: var(--gray-medium);
}

/* Input with Icon */
.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon .form-control {
    padding-right: 3rem;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-dark);
    font-size: 1rem;
    pointer-events: none;
}

/* Select Dropdown Styles */
.input-with-icon select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    cursor: pointer;
}

.input-with-icon select.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(150, 44, 80, 0.1);
}

/* Date Input Styles */
.input-with-icon input[type="date"].form-control {
    position: relative;
    cursor: pointer;
}

.input-with-icon input[type="date"].form-control::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

.input-with-icon input[type="date"].form-control::-moz-calendar-picker-indicator {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.input-with-icon input[type="date"].form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(150, 44, 80, 0.1);
}

/* Date input hover effect */
.input-with-icon input[type="date"].form-control:hover {
    border-color: var(--primary-color);
    background-color: rgba(150, 44, 80, 0.02);
}

/* Login Button */
.btn-login {
    width: auto;
    padding: 0.875rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    margin-left: auto;
    display: block;
    font-family: var(--font-family-primary);
}

.btn-login:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(150, 44, 80, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* Register Button */
.btn-register {
    width: auto;
    padding: 0.875rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    margin-left: auto;
    display: block;
    font-family: var(--font-family-primary);
}

.btn-register:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(150, 44, 80, 0.3);
}

.btn-register:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .form-container {
        padding: 2.5rem;
    }

    .image-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
    }

    .login-image-section {
        display: none !important;
    }

    .login-form-section {
        flex: 1;
        padding: 1.5rem;
        background: #faf8f0;
    }

    .form-container {
        max-width: 500px;
        padding: 2rem;
        background: transparent;
    }

    .image-overlay {
        padding: 2rem;
    }

    .image-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        min-height: auto;
    }

    .login-image-section {
        display: none !important;
    }

    .login-form-section {
        flex: 1;
        width: 100%;
        padding: 1rem;
        background: #faf8f0;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }

    .form-container {
        padding: 1.5rem;
        background: transparent;
    }

    .welcome-title {
        font-size: 1.8rem;
    }

    .image-title {
        font-size: 1.8rem;
    }

    .image-overlay {
        display: none;
    }
}

@media (max-width: 576px) {
    .login-container {
        min-height: auto;
    }

    .login-image-section {
        display: none !important;
    }

    .login-form-section {
        flex: 1;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        background: #faf8f0;
    }

    .form-container {
        padding: 1.25rem;
        background: transparent;
    }

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

    .image-title {
        font-size: 1.5rem;
    }

    .image-overlay {
        display: none;
    }

    .tab-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    .login-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        min-height: auto;
    }

    .login-image-section {
        display: none !important;
    }

    .login-form-section {
        flex: 1;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        background: #faf8f0;
    }

    .form-container {
        padding: 1rem;
        background: transparent;
    }

    .welcome-title {
        font-size: 1.4rem;
    }

    .image-title {
        font-size: 1.3rem;
    }

    .image-overlay {
        display: none;
    }

    .description-text {
        font-size: 0.85rem;
    }

    .form-label {
        font-size: 0.85rem;
    }

    .form-control {
        padding: 0.7rem 0.75rem;
        font-size: 0.85rem;
    }

    .login-button {
        padding: 0.8rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Form Validation Styles */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-control.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    display: block;
    color: #198754;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Loading State */
.btn-login.loading,
.btn-register.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
    animation: buttonPulse 1.2s ease-in-out infinite;
}

.btn-login.loading::after,
.btn-register.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes buttonPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}