/* ==========================================================================
   digihood branding — Login Page
   Matches admin pages: warm gradient + light liquid glass cards
   ========================================================================== */

:root {
    --dh-coral: #ff817e;
    --dh-coral-hover: #e06e6b;
    --dh-dark: #1a1a1a;
    --dh-white: #ffffff;
    --dh-text: #333333;
    --dh-text-light: #666666;
    --dh-radius: 30px;
}

/* Animated gradient background */
body.digihood-login {
    background-color: #5a4330;
    min-height: 100vh;
}

/* Warm dark background with soft brand-colored glows.
   Keeps the glass login card clearly readable while staying on-brand. */
.dh-gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    background-color: #5a4330;
    background-image:
        radial-gradient(68% 68% at 22% 18%, rgba(255, 129, 126, 0.52), transparent 72%),
        radial-gradient(68% 68% at 82% 86%, rgba(253, 141, 66, 0.50), transparent 72%),
        radial-gradient(56% 56% at 86% 24%, rgba(76, 175, 80, 0.32), transparent 72%),
        linear-gradient(135deg, #5d4631 0%, #6e543d 50%, #503c2a 100%);
    background-size: 160% 160%, 160% 160%, 150% 150%, 200% 200%;
    background-position: 0% 0%, 100% 100%, 100% 0%, 0% 50%;
    animation: dh-aurora 16s ease-in-out infinite;
}

@keyframes dh-aurora {
    0%   { background-position: 0% 0%, 100% 100%, 100% 0%, 0% 50%; }
    50%  { background-position: 30% 35%, 70% 65%, 78% 18%, 100% 50%; }
    100% { background-position: 0% 0%, 100% 100%, 100% 0%, 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .dh-gradient-bg { animation: none; }
}

/* Keep login content above the gradient */
body.digihood-login #login {
    position: relative;
    z-index: 1;
}

/* Logo */
body.digihood-login #login h1 a {
    background-image: url('../img/d1g1-logo-cz.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 260px !important;
    height: 70px !important;
    margin-bottom: 24px;
}

/* Form — dark liquid glass card */
body.digihood-login #loginform {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 32px 28px;
}

/* Labels — light text on dark glass */
body.digihood-login #loginform label {
    color: var(--dh-white);
    font-size: 14px;
    font-weight: 600;
}

/* Inputs — dark glass style */
body.digihood-login input[type="text"],
body.digihood-login input[type="password"] {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: var(--dh-radius) !important;
    color: var(--dh-white) !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    transition: all 0.2s ease;
}

body.digihood-login input[type="text"]::placeholder,
body.digihood-login input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

body.digihood-login input[type="text"]:focus,
body.digihood-login input[type="password"]:focus {
    border-color: var(--dh-coral) !important;
    box-shadow: 0 0 0 3px rgba(255, 129, 126, 0.25) !important;
    outline: none !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Submit button — coral */
body.digihood-login.wp-core-ui .button-primary {
    background: var(--dh-coral) !important;
    border: none !important;
    border-radius: var(--dh-radius) !important;
    box-shadow: 0 4px 15px rgba(255, 129, 126, 0.3) !important;
    color: var(--dh-white) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    text-shadow: none !important;
    transition: all 0.2s ease !important;
    width: 100%;
    height: auto !important;
    line-height: 1.5 !important;
    margin-top: 12px !important;
}

body.digihood-login.wp-core-ui .button-primary:hover,
body.digihood-login.wp-core-ui .button-primary:focus {
    background: var(--dh-coral-hover) !important;
    box-shadow: 0 6px 20px rgba(255, 129, 126, 0.45) !important;
    transform: translateY(-1px);
}

body.digihood-login.wp-core-ui .button-primary:active {
    transform: translateY(0);
}

/* Show/hide password */
body.digihood-login .wp-hide-pw {
    color: rgba(255, 255, 255, 0.5) !important;
}

body.digihood-login .wp-hide-pw:hover,
body.digihood-login .wp-hide-pw:focus {
    color: var(--dh-coral) !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* Checkbox */
body.digihood-login input[type="checkbox"] {
    accent-color: var(--dh-coral);
}

body.digihood-login .forgetmenot label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* Messages / Errors — dark glass cards */
body.digihood-login .message {
    border-left: 4px solid var(--dh-coral) !important;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--dh-white);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body.digihood-login #login_error {
    border-left: 4px solid var(--dh-coral) !important;
    background: rgba(255, 129, 126, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--dh-white);
    border-radius: 16px;
    padding: 14px 18px;
    animation: dh-shake 0.5s ease;
}

body.digihood-login #login_error a {
    color: var(--dh-coral) !important;
    font-weight: 700;
}

@keyframes dh-shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(6px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
    90% { transform: translateX(2px); }
}

/* Links — light on dark background */
body.digihood-login #backtoblog a,
body.digihood-login #nav a {
    color: rgba(255, 255, 255, 0.6) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

body.digihood-login #backtoblog a:hover,
body.digihood-login #nav a:hover {
    color: var(--dh-coral) !important;
}

/* Language switcher */
body.digihood-login #language-switcher .button {
    color: rgba(255, 255, 255, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--dh-radius) !important;
}

body.digihood-login #language-switcher .button:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.digihood-login #language-switcher select {
    border-radius: var(--dh-radius) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

/* digihood.cz footer link */
.dh-login-footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.dh-login-footer a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5) !important;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.2s;
}

.dh-login-footer a:hover {
    color: var(--dh-coral) !important;
}

/* Responsive */
@media (max-width: 480px) {
    body.digihood-login #login {
        width: 90% !important;
        padding: 20px 0;
    }
}
