/* ==========================================================================
   Danillach Custom Login - Main Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Outfit:wght@300;400;500;600&display=swap');

:root {
    --dcl-primary: #6B6B45;
    --dcl-primary-light: #8a8a5e;
    --dcl-primary-dark: #52523a;
    --dcl-accent: #C4678C;
    --dcl-accent-light: #d48aa5;
    --dcl-accent-dark: #a84d72;
    --dcl-bg-dark: #3a3025;
    --dcl-bg-light: #faf9f6;
    --dcl-text-primary: #2c2c2a;
    --dcl-text-secondary: #888780;
    --dcl-text-light: #b4b2a9;
    --dcl-border: #e8e6df;
    --dcl-white: #ffffff;
    --dcl-error: #e24b4a;
    --dcl-success: #639922;
    --dcl-font-display: 'Cormorant Garamond', Georgia, serif;
    --dcl-font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --dcl-radius: 12px;
    --dcl-radius-pill: 50px;
    --dcl-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & base */
.dcl-page *,
.dcl-page *::before,
.dcl-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.dcl-page {
    font-family: var(--dcl-font-body);
    color: var(--dcl-text-primary);
    background: var(--dcl-bg-light);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Layout: Split screen
   ========================================================================== */

.dcl-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Left panel - Form */
.dcl-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    background: var(--dcl-white);
    position: relative;
    overflow-y: auto;
}

.dcl-form-inner {
    width: 100%;
    max-width: 400px;
}

/* Right panel - Image & CTA */
.dcl-image-panel {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: var(--dcl-bg-dark);
}

.dcl-image-panel__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s ease;
}

.dcl-image-panel:hover .dcl-image-panel__bg {
    transform: scale(1.03);
}

.dcl-image-panel__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(58, 48, 37, 0.3) 0%,
        rgba(58, 48, 37, 0.6) 50%,
        rgba(58, 48, 37, 0.85) 100%
    );
    z-index: 1;
}

.dcl-image-panel__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

/* ==========================================================================
   Navigation buttons (back / close)
   ========================================================================== */

.dcl-nav-btn {
    position: absolute;
    top: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--dcl-transition);
    z-index: 10;
}

.dcl-nav-btn--back {
    left: 1.5rem;
    background: var(--dcl-bg-light);
    color: var(--dcl-text-primary);
}

.dcl-nav-btn--back:hover {
    background: var(--dcl-border);
}

.dcl-nav-btn--close {
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(4px);
}

.dcl-nav-btn--close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.dcl-nav-btn svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.dcl-heading {
    font-family: var(--dcl-login-heading-font-family, var(--dcl-font-display));
    font-size: var(--dcl-login-heading-font-size, 2.25rem);
    font-weight: 600;
    color: var(--dcl-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.dcl-subtitle {
    font-size: var(--dcl-subtitle-font-size, 0.9rem);
    font-family: var(--dcl-subtitle-font-family, var(--dcl-font-body));
    color: var(--dcl-text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.dcl-image-panel .dcl-subheading {
    font-family: var(--dcl-cta-subheading-font-family, var(--dcl-font-body));
    font-size: var(--dcl-cta-subheading-font-size, 0.85rem);
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.dcl-image-panel .dcl-heading-cta {
    font-family: var(--dcl-cta-heading-font-family, var(--dcl-font-display));
    font-size: var(--dcl-cta-heading-font-size, 2rem);
    font-weight: 600;
    color: white;
    margin-bottom: 2rem;
    line-height: 1.2;
}

/* ==========================================================================
   Form elements
   ========================================================================== */

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

.dcl-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--dcl-text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.dcl-input {
    width: 100%;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    font-family: var(--dcl-font-body);
    color: var(--dcl-text-primary);
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--dcl-border);
    outline: none;
    transition: var(--dcl-transition);
}

.dcl-input:focus {
    border-bottom-color: var(--dcl-primary);
}

.dcl-input::placeholder {
    color: var(--dcl-text-light);
}

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

.dcl-input-wrapper .dcl-input {
    padding-right: 3rem;
}

.dcl-toggle-password {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    min-width: 100px;
    height: 100%;
    padding: 0 1rem;
    background: var(--dcl-password-toggle-bg-color, #ffffff);
    border: 1px solid var(--dcl-password-toggle-text-color, var(--dcl-accent));
    border-radius: var(--dcl-password-toggle-border-radius, 0);
    color: var(--dcl-password-toggle-text-color, var(--dcl-accent));
    font-size: var(--dcl-password-toggle-font-size, 0.75rem);
    cursor: pointer;
    font-family: var(--dcl-password-toggle-font-family, var(--dcl-font-body));
    letter-spacing: 0.5px;
    transition: var(--dcl-transition);
    text-transform: uppercase;
}

.dcl-toggle-password:hover {
    color: var(--dcl-password-toggle-text-color, var(--dcl-accent));
    filter: brightness(0.97);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.dcl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.5rem;
    font-size: var(--dcl-login-button-font-size, 0.85rem);
    font-family: var(--dcl-login-button-font-family, var(--dcl-font-body));
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    border-radius: var(--dcl-radius-pill);
    cursor: pointer;
    transition: var(--dcl-transition);
    text-decoration: none;
    line-height: 1;
}

.dcl-btn--primary {
    background: var(--dcl-login-button-bg-color, var(--dcl-primary));
    color: var(--dcl-login-button-text-color, var(--dcl-white));
    border-radius: var(--dcl-login-button-border-radius, var(--dcl-radius-pill));
    width: 220px;
}

.dcl-btn--primary:hover {
    background: var(--dcl-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 107, 69, 0.3);
}

.dcl-btn--accent {
    background: var(--dcl-cta-button-bg-color, var(--dcl-accent));
    color: var(--dcl-cta-button-text-color, var(--dcl-white));
    border-radius: var(--dcl-cta-button-border-radius, var(--dcl-radius-pill));
    padding: 1rem 3rem;
    font-family: var(--dcl-cta-button-font-family, var(--dcl-font-body));
    font-size: var(--dcl-cta-button-font-size, 0.85rem);
}

.dcl-btn--accent:hover {
    background: var(--dcl-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(196, 103, 140, 0.4);
}

.dcl-btn--google {
    width: 260px;
    background: var(--dcl-white);
    color: var(--dcl-text-primary);
    border: 1px solid var(--dcl-border);
    font-weight: 400;
    letter-spacing: 0.3px;
    text-transform: none;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
}

.dcl-btn--google:hover {
    background: var(--dcl-bg-light);
    border-color: var(--dcl-text-light);
}

.dcl-btn--google svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dcl-btn:disabled,
.dcl-btn--loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Loading spinner */
.dcl-btn .dcl-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: dcl-spin 0.6s linear infinite;
    margin-right: 8px;
}

.dcl-btn--loading .dcl-spinner {
    display: inline-block;
}

@keyframes dcl-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Divider
   ========================================================================== */

.dcl-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
}

.dcl-divider__line {
    flex: 1;
    height: 1px;
    background: var(--dcl-border);
}

.dcl-divider__text {
    font-size: 0.8rem;
    color: var(--dcl-text-light);
    font-weight: 300;
}

/* ==========================================================================
   Links & misc
   ========================================================================== */

.dcl-link {
    color: var(--dcl-accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--dcl-transition);
}

.dcl-link:hover {
    color: var(--dcl-accent-dark);
    text-decoration: underline;
}

.dcl-forgot-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--dcl-text-light);
}

.dcl-forgot-link a {
    color: var(--dcl-accent);
    text-decoration: none;
    font-weight: 400;
}

.dcl-forgot-link a:hover {
    text-decoration: underline;
}

.dcl-form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dcl-border);
}

.dcl-form-footer p {
    font-size: 0.85rem;
    color: var(--dcl-text-secondary);
}

.dcl-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   Messages / alerts
   ========================================================================== */

.dcl-message {
    padding: 0.75rem 1rem;
    border-radius: var(--dcl-radius);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    display: none;
    animation: dcl-slideDown 0.3s ease;
}

.dcl-message--error {
    background: #fcebeb;
    color: #a32d2d;
    border: 1px solid #f7c1c1;
}

.dcl-message--success {
    background: #eaf3de;
    color: #3b6d11;
    border: 1px solid #c0dd97;
}

@keyframes dcl-slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Panel switch (login <-> register) for mobile
   ========================================================================== */

.dcl-panel-switch {
    display: none;
}

/* ==========================================================================
   Decorative dots
   ========================================================================== */

.dcl-dots {
    display: flex;
    gap: 6px;
    margin-top: 2.5rem;
}

.dcl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: var(--dcl-transition);
}

.dcl-dot--active {
    background: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   Logo
   ========================================================================== */

.dcl-logo {
    margin-bottom: 2rem;
}

.dcl-logo__text {
    font-family: var(--dcl-logo-font-family, var(--dcl-font-display));
    font-size: var(--dcl-logo-font-size, 1.75rem);
    font-weight: 600;
    color: var(--dcl-primary);
    letter-spacing: 1px;
    text-decoration: none;
}

.dcl-logo__divider {
    color: var(--dcl-accent);
}

.dcl-logo__img {
    max-width: 200px;
    max-height: 60px;
    width: auto;
    height: auto;
    display: block;
}

.dcl-logo a {
    display: inline-block;
    text-decoration: none;
}

/* ==========================================================================
   Remember me checkbox
   ========================================================================== */

.dcl-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.dcl-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--dcl-border);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--dcl-transition);
    position: relative;
}

.dcl-checkbox:checked {
    background: var(--dcl-primary);
    border-color: var(--dcl-primary);
}

.dcl-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.dcl-checkbox-label {
    font-size: 0.8rem;
    color: var(--dcl-text-secondary);
    cursor: pointer;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .dcl-container {
        flex-direction: column;
    }

    .dcl-form-panel {
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    .dcl-image-panel {
        min-height: 350px;
    }

    .dcl-heading {
        font-size: 1.75rem;
    }

    .dcl-image-panel .dcl-heading-cta {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .dcl-form-panel {
        padding: 1.5rem 1.25rem;
    }

    .dcl-heading {
        font-size: 1.5rem;
    }

    .dcl-btn--primary,
    .dcl-btn--google {
        width: 100%;
    }

    .dcl-divider {
        max-width: 100%;
    }

    .dcl-form-inner {
        max-width: 100%;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

.dcl-fade-in {
    animation: dcl-fadeIn 0.5s ease both;
}

.dcl-fade-in-up {
    animation: dcl-fadeInUp 0.6s ease both;
}

@keyframes dcl-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes dcl-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dcl-delay-1 { animation-delay: 0.1s; }
.dcl-delay-2 { animation-delay: 0.2s; }
.dcl-delay-3 { animation-delay: 0.3s; }
.dcl-delay-4 { animation-delay: 0.4s; }
.dcl-delay-5 { animation-delay: 0.5s; }
