/**
 * Login Modal Styles
 * Responsive CSS Grid layout matching Figma design
 */

/* Modal Base Styles */
.login-modal {
    display: none;
}

.login-modal.is-open {
    display: block;
}

.login-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: mmfadeIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.login-modal__container {
    background-color: #FFFFFF;
    border-radius: 8px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Grid Layout */
.login-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

/* Left Side - Form Section */
.login-form-section {
    padding: 48px 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #FFFFFF;
}

/* Modal View Switching */
.modal-view {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-view.active {
    display: block;
    opacity: 1;
}

/* Close Button */
.login-modal__close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    z-index: 10000;
}

.login-modal__close:hover {
    opacity: 0.7;
}

.login-modal__close svg {
    width: 24px;
    height: 24px;
}

/* Typography */
.modal-title {
    font-family: 'Kollektif', Georgia, serif;
    font-size: 48px;
    line-height: 1.5;
    color: #343434;
    margin: 0 0 8px 0;
    font-weight: 400;
}

.modal-subtitle {
    font-family: 'Kollektif', Georgia, serif;
    font-size: 22px;
    line-height: 1.5;
    color: #343434;
    margin: 0 0 12px 0;
    font-weight: 400;
}

.modal-description {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.1;
    color: #828282;
    margin: 0 0 32px 0;
}

/* Form Styles */
.login-modal-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 320px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #1E1E1E;
    font-weight: 400;
}

.form-field .input {
    padding: 12px 16px;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1;
    color: #1E1E1E;
    background: #FFFFFF;
    transition: border-color 0.2s;
}

.form-field .input::placeholder {
    color: #B3B3B3;
}

.form-field .input:focus {
    outline: none;
    border-color: #343434;
}

/* Password Field with Toggle */
.password-field {
    position: relative;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .input {
    width: 100%;
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.password-toggle:hover {
    opacity: 0.7;
}

.password-toggle .eye-icon {
    width: 20px;
    height: 20px;
}

/* Primary Button */
.button-primary {
    padding: 12px;
    background: #343434;
    border: 1px solid #2C2C2C;
    border-radius: 8px;
    color: #F5F5F5;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center;
}

.button-primary:hover {
    background: #2C2C2C;
    transform: translateY(-1px);
}

.button-primary:active {
    transform: translateY(0);
}

/* Links */
.form-links {
    margin-top: -8px;
}

.text-link {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #1E1E1E;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.text-link:hover {
    opacity: 0.7;
}

.register-link {
    margin-top: 8px;
}

/* Right Side - Image Section */
.login-image-section {
    position: relative;
    overflow: hidden;
    border-radius: 0 8px 8px 0;
}

.modal-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Animations */
@keyframes mmfadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mmslideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mmfadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes mmslideOut {
    from { 
        opacity: 1;
        transform: translateY(0);
    }
    to { 
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Responsive Breakpoints */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .login-modal__container {
        width: 95%;
    }
    
    .login-modal-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .login-form-section {
        padding: 40px 32px;
    }
    
    .modal-title {
        font-size: 40px;
    }
    
    .modal-subtitle {
        font-size: 20px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .login-modal__container {
        width: 95%;
        max-height: 95vh;
    }
    
    .login-modal-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .login-form-section {
        padding: 32px 24px;
        order: 1;
    }
    
    .login-image-section {
        display: none;
    }
    
    .modal-title {
        font-size: 36px;
    }
    
    .modal-subtitle {
        font-size: 18px;
    }
    
    .modal-description {
        font-size: 13px;
    }
    
    .login-modal-form {
        max-width: 100%;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .login-form-section {
        padding: 24px 20px;
    }
    
    .modal-title {
        font-size: 32px;
    }
    
    .modal-subtitle {
        font-size: 16px;
    }
    
    .modal-description {
        font-size: 12px;
        margin-bottom: 24px;
    }
    
    .form-field label {
        font-size: 14px;
    }
    
    .form-field .input {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .button-primary {
        font-size: 14px;
        padding: 10px;
    }
    
    .text-link {
        font-size: 14px;
    }
}

/* High Resolution Displays */
@media (min-width: 1440px) {
    .login-modal__container {
        max-width: 1166px;
    }
}

/* Accessibility */
.login-modal__overlay:focus,
.login-modal__close:focus,
.password-toggle:focus {
    outline: 2px solid #343434;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .login-modal {
        display: none !important;
    }
}