/* Ana site — giriş modalı (form; üst başlık, gövde, alt bilgi) */
html.hw-login-modal-open,
body.hw-login-modal-open {
    overflow: hidden;
    touch-action: none;
}

.hw-login-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
        max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
    box-sizing: border-box;
}

.hw-login-modal.is-open {
    display: flex;
}

.hw-login-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 11, 20, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}

.hw-login-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 440px;
    max-height: min(90vh, 820px);
    background: var(--card-bg, rgba(11, 24, 40, 0.96));
    border: 1px solid var(--border, rgba(56, 189, 248, 0.2));
    border-radius: 20px;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(148, 163, 184, 0.08);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: hw-login-modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

body#mainBody[data-theme="light"] .hw-login-modal__dialog {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18);
}

@keyframes hw-login-modal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hw-login-modal__header {
    position: relative;
    text-align: center;
    padding: 1.25rem 3rem 1rem 1.25rem;
    border-bottom: 1px solid var(--border, rgba(56, 189, 248, 0.14));
    flex-shrink: 0;
}

.hw-login-modal__head-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.hw-login-modal__head-brand {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.65rem;
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.18), rgba(14, 165, 233, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.22);
    color: var(--primary, #38bdf8);
}

.hw-login-modal__head-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.hw-login-modal__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text, #e0f2fe);
    font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, sans-serif;
    text-align: center;
    width: 100%;
}

.hw-login-modal__subtitle {
    margin: 0.45rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-bio, #94a3b8);
    line-height: 1.45;
    text-align: center;
    width: 100%;
    max-width: 17.5rem;
    padding: 0 0.25rem;
    box-sizing: border-box;
}

body#mainBody[data-theme="light"] .hw-login-modal__title {
    color: #0f172a;
}

body#mainBody[data-theme="light"] .hw-login-modal__subtitle {
    color: #64748b;
}

.hw-login-modal__close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary, #38bdf8);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.hw-login-modal__close:hover {
    background: rgba(56, 189, 248, 0.22);
    color: #fff;
}

.hw-login-modal__close:active {
    transform: scale(0.96);
}

body#mainBody[data-theme="light"] .hw-login-modal__close {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

.hw-login-modal__body {
    flex: 1;
    min-height: 0;
    background: rgba(4, 10, 18, 0.45);
    position: relative;
    padding: 1.25rem 1.1rem 1.1rem;
}

.hw-login-modal__alert {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 1rem;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.45;
    font-weight: 500;
}

.hw-login-modal__alert--error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.hw-login-modal__alert--success {
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
}

body#mainBody[data-theme="light"] .hw-login-modal__alert--error {
    background: #fef2f2;
    border-color: rgba(220, 38, 38, 0.25);
    color: #991b1b;
}

body#mainBody[data-theme="light"] .hw-login-modal__alert--success {
    background: #f0fdf4;
    border-color: rgba(22, 163, 74, 0.28);
    color: #166534;
}

body#mainBody[data-theme="light"] .hw-login-modal__body {
    background: #f8fafc;
}

.hw-login-modal__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hw-login-modal__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hw-login-modal__input-shell {
    position: relative;
    width: 100%;
}

.hw-login-modal__email-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
    max-height: min(11rem, 30vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    border-radius: 12px;
    border: 1px solid var(--border, rgba(56, 189, 248, 0.25));
    background: rgba(11, 24, 40, 0.98);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.85) transparent;
}

.hw-login-modal__email-suggestions li {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text, #e0f2fe);
    transition: background 0.15s ease, color 0.15s ease;
}

.hw-login-modal__email-suggestions li:hover,
.hw-login-modal__email-suggestions li:focus {
    background: rgba(56, 189, 248, 0.18);
    outline: none;
}

body#mainBody[data-theme="light"] .hw-login-modal__email-suggestions {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

body#mainBody[data-theme="light"] .hw-login-modal__email-suggestions li {
    color: #0f172a;
}

body#mainBody[data-theme="light"] .hw-login-modal__email-suggestions li:hover,
body#mainBody[data-theme="light"] .hw-login-modal__email-suggestions li:focus {
    background: rgba(14, 165, 233, 0.12);
}

.hw-login-modal__email-suggestions::-webkit-scrollbar {
    width: 9px;
}

.hw-login-modal__email-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

.hw-login-modal__email-suggestions::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.8);
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

body#mainBody[data-theme="light"] .hw-login-modal__email-suggestions::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.7);
}

.hw-login-modal__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-bio, #94a3b8);
}

body#mainBody[data-theme="light"] .hw-login-modal__label {
    color: #475569;
}

.hw-login-modal__input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border, rgba(56, 189, 248, 0.25));
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.55);
    color: var(--text, #e0f2fe);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hw-login-modal__input::placeholder {
    color: rgba(148, 163, 184, 0.65);
}

.hw-login-modal__input:focus {
    outline: none;
    border-color: var(--primary, #38bdf8);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

body#mainBody[data-theme="light"] .hw-login-modal__input {
    background: #fff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.12);
}

.hw-login-modal__password-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: stretch;
}

.hw-login-modal__input--with-toggle {
    padding-right: 2.85rem;
}

.hw-login-modal__password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--primary, #38bdf8);
    cursor: pointer;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.hw-login-modal__password-toggle:hover {
    background: transparent;
    color: #e0f2fe;
    opacity: 0.92;
}

.hw-login-modal__password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.hw-login-modal__password-toggle i {
    font-size: 1.15rem;
    line-height: 1;
}

body#mainBody[data-theme="light"] .hw-login-modal__password-toggle {
    background: transparent;
    color: #0284c7;
}

body#mainBody[data-theme="light"] .hw-login-modal__password-toggle:hover {
    background: transparent;
    color: #0369a1;
    opacity: 1;
}

.hw-login-modal__submit-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hw-login-modal__submit:disabled {
    opacity: 0.88;
    cursor: not-allowed;
    transform: none;
}

.hw-login-modal__submit {
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--primary, #38bdf8), var(--secondary, #0ea5e9));
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.hw-login-modal__submit:hover {
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.35);
}

.hw-login-modal__submit:active {
    transform: scale(0.98);
}

.hw-login-modal__helper {
    margin: 0;
    text-align: center;
    font-size: 0.8125rem;
}

.hw-login-modal__helper a {
    color: var(--primary, #38bdf8);
    font-weight: 600;
    text-decoration: none;
}

.hw-login-modal__helper a:hover {
    text-decoration: underline;
}

.hw-login-modal__link-btn {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary, #38bdf8);
    cursor: pointer;
    text-decoration: none;
}

.hw-login-modal__link-btn:hover {
    text-decoration: underline;
}

body#mainBody[data-theme="light"] .hw-login-modal__link-btn {
    color: #0284c7;
}

body#mainBody[data-theme="light"] .hw-login-modal__helper a {
    color: #0284c7;
}

.hw-login-modal__panel[hidden] {
    display: none !important;
}

.hw-login-modal__verify-hint {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-bio, #94a3b8);
    line-height: 1.45;
    text-align: center;
}

.hw-login-modal__verify-note {
    margin: -0.25rem 0 0.75rem;
    font-size: 0.78rem;
    opacity: 0.92;
}

.hw-login-modal__code-row {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    flex-wrap: nowrap;
}

.hw-login-modal__code-box {
    width: 2.4rem;
    height: 2.65rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    border: 1px solid var(--border, rgba(56, 189, 248, 0.25));
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    color: var(--text, #e0f2fe);
    box-sizing: border-box;
}

.hw-login-modal__code-box:focus {
    outline: none;
    border-color: var(--primary, #38bdf8);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

body#mainBody[data-theme="light"] .hw-login-modal__code-box {
    background: #fff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.12);
}

.hw-login-modal__countdown {
    margin: 0 0 1rem;
    font-size: 0.78rem;
    color: var(--text-bio, #94a3b8);
    text-align: center;
}

.hw-login-modal__submit--secondary {
    margin-top: 0.5rem;
    background: transparent;
    color: var(--primary, #38bdf8);
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.hw-login-modal__submit--secondary:hover {
    background: rgba(56, 189, 248, 0.1);
    box-shadow: none;
}

body#mainBody[data-theme="light"] .hw-login-modal__submit--secondary {
    color: #0284c7;
    border-color: rgba(2, 132, 199, 0.35);
}

.hw-login-modal__footer {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-top: 1px solid var(--border, rgba(56, 189, 248, 0.14));
    font-size: 0.75rem;
    color: var(--text-bio, #94a3b8);
    text-align: center;
    line-height: 1.45;
}

.hw-login-modal__footer a {
    color: var(--primary, #38bdf8);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.hw-login-modal__footer a:hover {
    text-decoration: underline;
}

body#mainBody[data-theme="light"] .hw-login-modal__footer {
    color: #64748b;
}

body#mainBody[data-theme="light"] .hw-login-modal__footer a {
    color: #0284c7;
}

@media (max-width: 480px) {
    .hw-login-modal__body {
        padding: 1rem 0.9rem;
    }
}
