/* ================================
   WEINGUT HITZIGER - LOGIN STYLES
   Premium Wine Design - Gold & Black
   @author QUADRONET® Internetlösungen
   @version 1.0
   ================================ */

/* ================================
   LOGIN WRAPPER & CARD
   ================================ */
.hz-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 1rem;
}

.hz-login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

/* Goldene Akzent-Linie oben */
.hz-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #8b7355 0%, 
        #c9a961 25%, 
        #d4af37 50%, 
        #c9a961 75%, 
        #8b7355 100%
    );
}

/* ================================
   HEADER
   ================================ */
.hz-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.hz-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1d1d1b 0%, #2d2d2b 100%);
    border-radius: 50%;
    color: #d4af37;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 15px rgba(29, 29, 27, 0.3);
}

.hz-login-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: #1d1d1b;
    margin: 0 0 0.5rem;
}

.hz-login-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* ================================
   FLASH MESSAGES
   ================================ */
.hz-login-message {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hz-login-message-error,
.hz-login-message-2 {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.hz-login-message-warning,
.hz-login-message-1 {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #d97706;
}

.hz-login-message-success,
.hz-login-message-0 {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.hz-login-message-info,
.hz-login-message--1 {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

/* ================================
   FORM ELEMENTS
   ================================ */
.hz-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hz-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hz-form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1b;
}

.hz-form-label svg {
    color: #8b7355;
}

.hz-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    background: #fafafa;
    color: #1d1d1b;
    transition: all 0.2s ease;
    outline: none;
}

.hz-form-input::placeholder {
    color: #999;
}

.hz-form-input:hover {
    border-color: #ccc;
}

.hz-form-input:focus {
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

/* ================================
   PASSWORD FIELD
   ================================ */
.hz-password-wrapper {
    position: relative;
}

.hz-password-wrapper .hz-form-input {
    padding-right: 3rem;
}

.hz-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hz-password-toggle:hover {
    color: #1d1d1b;
}

/* ================================
   CHECKBOX
   ================================ */
.hz-form-row {
    flex-direction: row;
    align-items: center;
}

.hz-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    user-select: none;
}

.hz-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.hz-checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.hz-checkbox:checked + .hz-checkbox-custom {
    background: #d4af37;
    border-color: #d4af37;
}

.hz-checkbox:checked + .hz-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.hz-checkbox:focus + .hz-checkbox-custom {
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

/* ================================
   BUTTONS
   ================================ */
.hz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.hz-btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #c9a961 100%);
    color: #1d1d1b;
    border-color: #d4af37;
}

.hz-btn-primary:hover {
    background: linear-gradient(135deg, #e5c04a 0%, #d4af37 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

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

.hz-btn-login {
    width: 100%;
    margin-top: 0.5rem;
}

.hz-btn-outline {
    background: transparent;
    color: #1d1d1b;
    border-color: #1d1d1b;
}

.hz-btn-outline:hover {
    background: #1d1d1b;
    color: #fff;
}

/* ================================
   FOOTER LINKS
   ================================ */
.hz-login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.hz-login-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b7355;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.hz-login-link:hover {
    color: #d4af37;
}

/* ================================
   DIVIDER
   ================================ */
.hz-login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.hz-login-divider::before,
.hz-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

.hz-login-divider span {
    padding: 0 1rem;
    color: #999;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ================================
   REGISTER SECTION
   ================================ */
.hz-login-register {
    text-align: center;
}

.hz-login-register p {
    margin: 0 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.hz-login-register .hz-btn {
    width: 100%;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 480px) {
    .hz-login-card {
        padding: 1.75rem;
        border-radius: 12px;
    }

    .hz-login-icon {
        width: 64px;
        height: 64px;
    }

    .hz-login-icon svg {
        width: 32px;
        height: 32px;
    }

    .hz-login-title {
        font-size: 1.75rem;
    }

    .hz-form-input {
        padding: 0.75rem;
    }

    .hz-btn {
        padding: 0.875rem 1.25rem;
    }
}

/* ================================
   DARK MODE SUPPORT (Optional)
   ================================ */
@media (prefers-color-scheme: dark) {
    /* Nur aktivieren wenn gewünscht */
}

/* ================================
   LOGOUT / LOGGED IN STATE
   ================================ */
.hz-login-icon-success {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: #fff;
}

.hz-login-icon-forgot {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: #fff;
}

.hz-user-name {
    color: #d4af37;
    font-size: 1.1rem;
}

.hz-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #f8f8f8;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.hz-user-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1d1d1b 0%, #2d2d2b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4af37;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.hz-user-details {
    flex: 1;
    min-width: 0;
}

.hz-user-fullname {
    font-weight: 600;
    color: #1d1d1b;
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.hz-user-email {
    color: #666;
    margin: 0;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Quick Links */
.hz-quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hz-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    color: #1d1d1b;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.hz-quick-link:hover {
    border-color: #d4af37;
    color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hz-quick-link svg {
    color: #8b7355;
    transition: color 0.2s;
}

.hz-quick-link:hover svg {
    color: #d4af37;
}

/* Logout Button */
.hz-btn-logout {
    width: 100%;
    background: #fff;
    color: #dc2626;
    border: 2px solid #dc2626;
}

.hz-btn-logout:hover {
    background: #dc2626;
    color: #fff;
}

.hz-logout-form {
    margin-top: 0;
}

/* ================================
   PASSWORD REQUIREMENTS
   ================================ */
.hz-password-requirements {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 8px;
    border-left: 4px solid #d4af37;
}

.hz-requirements-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem;
}

.hz-requirements-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.85rem;
    color: #666;
}

.hz-requirements-list li {
    margin-bottom: 0.25rem;
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hz-login-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Form field focus animation */
.hz-form-input:focus {
    animation: inputPulse 0.3s ease;
}

@keyframes inputPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

/* ================================
   ACCOUNT MODAL STYLES
   ================================ */
.hz-account-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hz-account-modal.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.hz-account-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(29, 29, 27, 0.85);
    backdrop-filter: blur(4px);
}

.hz-account-modal-content {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    background: #1d1d1b !important;
    border-radius: 16px;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5);
    margin: 1rem;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.hz-account-modal.is-open .hz-account-modal-content {
    transform: translateY(0) scale(1);
}

/* Goldene Akzent-Linie */
.hz-account-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #8b7355 0%, 
        #c9a961 25%, 
        #d4af37 50%, 
        #c9a961 75%, 
        #8b7355 100%
    );
    border-radius: 16px 16px 0 0;
}

.hz-account-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.hz-account-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.hz-account-modal-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.hz-account-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #1d1d1b 0%, #2d2d2b 100%);
    border-radius: 50%;
    color: #d4af37;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(29, 29, 27, 0.3);
}

.hz-account-modal-icon--loggedin {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: #fff;
}

.hz-account-modal-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff !important;
    margin: 0 0 0.25rem;
}

.hz-account-modal-subtitle {
    font-size: 0.9rem;
    color: #999 !important;
    margin: 0;
}

.hz-account-modal-body {
    padding: 0 2rem 1.5rem;
}

.hz-account-modal-footer {
    padding: 1rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.2) !important;
}

.hz-account-modal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #999;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.hz-account-modal-link:hover {
    color: #d4af37;
}

/* Modal Login Form - Dark Theme */
.hz-modal-login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hz-modal-login-form .hz-form-group {
    margin-bottom: 0;
}

.hz-modal-login-form .hz-form-label {
    color: #d4af37 !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.hz-modal-login-form .hz-form-label svg {
    color: #d4af37 !important;
}

.hz-modal-login-form .hz-form-input {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px;
    color: #fff !important;
    transition: all 0.2s ease;
}

.hz-modal-login-form .hz-form-input::placeholder {
    color: #666 !important;
}

.hz-modal-login-form .hz-form-input:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.hz-modal-login-form .hz-form-input:focus {
    border-color: #d4af37 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15) !important;
    outline: none;
}

.hz-modal-login-form .hz-password-toggle {
    color: #666;
}

.hz-modal-login-form .hz-password-toggle:hover {
    color: #d4af37;
}

/* Account Navigation (eingeloggt) - Dark Theme */
.hz-account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hz-account-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.hz-account-nav-link:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
    color: #d4af37;
    transform: translateX(4px);
}

.hz-account-nav-link svg {
    color: #d4af37;
    transition: color 0.2s;
}

.hz-account-nav-link:hover svg {
    color: #d4af37;
}

/* Form Error */
.hz-form-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.875rem;
}

/* Loading Spinner */
.hz-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Shake Animation für Error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.hz-form-error.shake {
    animation: shake 0.5s ease-in-out;
}

/* Success State für Button */
.hz-btn-login.is-success {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%) !important;
    border-color: #16a34a !important;
}

.hz-btn-login.is-success .hz-btn-text {
    color: #fff !important;
}

/* ================================
   IFRAME CONTAINER FÜR MODAL
   ================================ */
.hz-iframe-container {
    position: relative;
    min-height: 300px;
}

.hz-iframe-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

.hz-iframe-loading .hz-spinner {
    color: #d4af37;
}

#hz-login-iframe {
    width: 100%;
    min-height: 280px;
    border: none;
    background: transparent;
}

/* Modal Loading State */
.hz-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 2rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.hz-modal-loading .hz-spinner {
    color: #d4af37;
}

/* Modal Error State */
.hz-modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.hz-modal-error svg {
    color: #f87171;
}

.hz-modal-error p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Modal Success State */
.hz-modal-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    text-align: center;
}

.hz-modal-success svg {
    color: #22c55e;
    margin-bottom: 0.5rem;
}

.hz-modal-success h4 {
    color: #fff;
    margin: 0;
    font-size: 1.25rem;
}

.hz-modal-success p {
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    font-size: 0.9rem;
}

.hz-btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Logout Button im Modal - Dark Theme */
.hz-account-modal .hz-btn-logout {
    background: transparent;
    color: #999;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

.hz-account-modal .hz-btn-logout:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
    color: #dc2626;
}

.hz-account-modal .hz-btn-logout svg {
    color: inherit;
}

/* Account Icon mit grünem Punkt wenn eingeloggt */
.hz-account-trigger.is-logged-in::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #1d1d1b;
}

/* Header Icon Button - Sichtbar machen */
.hz-header-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #f5f5f0; /* cream color */
    cursor: pointer;
    transition: all 0.2s ease;
}

.hz-header-icon svg {
    width: 20px;
    height: 20px;
}

.hz-header-icon:hover {
    color: #d4af37;
    background: rgba(255, 255, 255, 0.05);
}

/* Account Trigger Button spezifisch */
button.hz-header-icon,
button.hz-account-trigger {
    background: transparent !important;
    border: none !important;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Mobile Optimierung */
@media (max-width: 480px) {
    .hz-account-modal-content {
        max-width: 100%;
        margin: 0.5rem;
        border-radius: 12px;
    }
    
    .hz-account-modal-header {
        padding: 1.5rem 1.5rem 0.75rem;
    }
    
    .hz-account-modal-body {
        padding: 0 1.5rem 1rem;
    }
    
    .hz-account-modal-footer {
        padding: 0 1.5rem 1.5rem;
    }
    
    .hz-account-modal-icon {
        width: 56px;
        height: 56px;
    }
    
    .hz-account-modal-title {
        font-size: 1.25rem;
    }
}
