/**
 * Custom Login Page Styles
 * Thames Tides Design - Twickenham Yacht Club
 *
 * Matches the reference design from Login.tsx
 */

/* Reset WordPress default login styles */
body.login {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    padding: 0 !important;
    font-family: 'DM Sans', sans-serif !important;
}

body.login div#login {
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
}

/* Main Wrapper - Two Column Layout */
.tyc-login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    width: 100vw;
    min-height: 100vh;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    background: hsl(210 50% 20%);
}

/* LEFT SIDE - Maritime Illustration */
.tyc-login-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
}

/* Animated Background Elements */
.tyc-login-bg-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Sun Animation */
.tyc-sun {
    position: absolute;
    top: 2.5rem;
    right: 5rem;
    width: 6rem;
    height: 6rem;
    color: hsl(40 35% 75% / 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Waves */
.tyc-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8rem;
}

.tyc-wave {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 8rem;
    color: hsl(200 70% 45% / 0.4);
}

.tyc-wave-2 {
    bottom: 2rem;
    color: hsl(200 70% 45% / 0.3);
}

.tyc-wave-3 {
    bottom: 4rem;
    color: hsl(200 70% 45% / 0.2);
}

/* Main Icon Container */
.tyc-login-main-icon {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.tyc-ship-wheel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ship Wheel */
.tyc-ship-wheel {
    width: 16rem;
    height: 16rem;
    color: hsl(40 35% 75%);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(-2deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

/* Anchor Decorations */
.tyc-anchor {
    position: absolute;
    color: hsl(40 35% 75% / 0.4);
}

.tyc-anchor-left {
    left: -5rem;
    top: 2.5rem;
    width: 4rem;
    height: 4rem;
    transform: rotate(12deg);
}

.tyc-anchor-right {
    right: -4rem;
    bottom: 2.5rem;
    width: 3rem;
    height: 3rem;
    transform: rotate(-12deg);
}

/* Welcome Text */
.tyc-login-welcome {
    text-align: center;
}

.tyc-login-welcome h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: hsl(40 35% 75%);
    margin: 0 0 0.5rem 0;
    font-family: 'Marcellus', serif;
}

.tyc-login-welcome p {
    font-size: 1.125rem;
    color: hsl(0 0% 100% / 0.8);
    max-width: 28rem;
    margin: 0;
}

/* RIGHT SIDE - Login Form */
.tyc-login-form-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.tyc-login-card {
    width: 100%;
    max-width: 28rem;
    background: hsl(0 0% 100% / 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid hsl(40 35% 75% / 0.2);
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 2rem;
}

/* Card Header */
.tyc-login-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tyc-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background: hsl(40 35% 75% / 0.1);
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.tyc-login-icon svg {
    width: 2rem;
    height: 2rem;
    color: hsl(40 35% 75%);
}

.tyc-login-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: hsl(210 20% 15%);
    margin: 0 0 0.5rem 0;
    font-family: 'Marcellus', serif;
}

.tyc-login-subtitle {
    font-size: 1rem;
    color: hsl(210 15% 45%);
    margin: 0;
}

/* WordPress Login Form Styling */
#login form {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#login form p label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(210 20% 15%);
    margin-bottom: 0.5rem;
    display: block;
}

#login form input[type="text"],
#login form input[type="password"],
#login form input[type="email"] {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    background: hsl(0 0% 100% / 0.5) !important;
    border: 1px solid hsl(210 20% 90%) !important;
    border-radius: 0.375rem !important;
    outline: none !important;
    transition: border-color 0.2s !important;
    box-shadow: none !important;
    font-family: 'DM Sans', sans-serif !important;
}

#login form input[type="text"]:focus,
#login form input[type="password"]:focus,
#login form input[type="email"]:focus {
    border-color: hsl(210 50% 20%) !important;
    box-shadow: 0 0 0 3px hsl(210 50% 20% / 0.1) !important;
}

/* Submit Button */
#login form .button-primary {
    width: 100% !important;
    padding: 0.75rem 2rem !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    background: hsl(210 50% 20%) !important;
    color: hsl(0 0% 100%) !important;
    border: none !important;
    border-radius: 0.375rem !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    text-shadow: none !important;
    box-shadow: none !important;
    margin-top: 1rem !important;
    font-family: 'DM Sans', sans-serif !important;
}

#login form .button-primary:hover {
    background: hsl(210 50% 20% / 0.9) !important;
}

/* Remember Me / Lost Password */
#login form p.forgetmenot {
    margin-bottom: 1rem !important;
}

#login form p.forgetmenot label {
    font-size: 0.875rem !important;
    color: hsl(210 15% 45%) !important;
}

#login #nav,
#login #backtoblog {
    display: none !important;
}

/* Card Footer */
.tyc-login-card-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(210 20% 90%);
    text-align: center;
}

.tyc-login-footer-text {
    font-size: 0.875rem;
    color: hsl(210 15% 45%);
    margin: 0;
}

.tyc-login-footer-link {
    color: hsl(40 35% 75%);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.tyc-login-footer-link:hover {
    color: hsl(40 35% 65%);
}

/* Mobile Ship Wheel - Hidden on Desktop */
.tyc-login-mobile-icon {
    display: none;
}

/* Messages */
#login .message,
#login #login_error {
    background: hsl(0 0% 100% / 0.95) !important;
    border-left: 4px solid hsl(210 50% 20%) !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

#login #login_error {
    border-left-color: hsl(0 84.2% 60.2%) !important;
}

/* Hide WordPress Logo */
#login h1 a {
    display: none !important;
}

/* RESPONSIVE - Mobile */
@media (max-width: 1023px) {
    .tyc-login-wrapper {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .tyc-login-illustration {
        display: none;
    }

    .tyc-login-mobile-icon {
        display: block;
        position: absolute;
        top: 6rem;
        right: 2rem;
        opacity: 0.2;
    }

    .tyc-login-mobile-icon svg {
        width: 8rem;
        height: 8rem;
        color: hsl(40 35% 75%);
    }

    .tyc-login-card {
        margin-top: 2rem;
    }
}

/* Print Styles */
@media print {
    .tyc-login-illustration,
    .tyc-login-mobile-icon {
        display: none !important;
    }
}
