/* ====================================================
   🌹 BURO Web Login — Bordeaux & Cream brand styling
   ==================================================== */

.web-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #F7F2E6 0%, #E8DFD0 100%);
    font-family: 'Sora', 'Inter', sans-serif;
    overflow-y: auto;
}

/* Декоративный фон с цветочными "пятнами" */
.web-login-overlay::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(92,0,3,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.web-login-overlay::after {
    content: '';
    position: absolute;
    bottom: -160px; left: -160px;
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(122,26,29,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.wl-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #FFFFFF;
    border: 1px solid rgba(92, 0, 3, 0.08);
    border-radius: 28px;
    padding: 44px 32px 36px;
    text-align: center;
    box-shadow:
        0 1px 2px rgba(92, 0, 3, 0.04),
        0 24px 64px rgba(92, 0, 3, 0.16),
        0 -1px 0 rgba(255, 255, 255, 0.9) inset;
    animation: wlFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Тонкая декоративная линия наверху карточки */
.wl-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 3px;
    background: linear-gradient(90deg, transparent 0%, #5C0003 50%, transparent 100%);
    border-radius: 0 0 3px 3px;
}

@keyframes wlFadeIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ───── Кнопка закрытия ───── */
.wl-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F7F2E6;
    border: 1px solid rgba(92, 0, 3, 0.06);
    color: #5C5C58;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    padding: 0;
}

.wl-close-btn:hover {
    background: #5C0003;
    color: #FFFFFF;
    border-color: #5C0003;
    transform: rotate(90deg);
}

/* ───── Логотип и заголовки ───── */
.wl-logo {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
    background: linear-gradient(135deg, #5C0003 0%, #7A1A1D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.wl-subtitle {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    color: #8A8A84;
    margin-bottom: 36px;
    text-transform: uppercase;
}

.wl-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 700;
    color: #1a1a18;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.wl-desc {
    font-size: 14px;
    color: #5C5C58;
    margin: 0 0 28px;
    line-height: 1.5;
    padding: 0 8px;
}

/* ───── Форма ───── */
.wl-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 8px;
}

.wl-input {
    width: 100%;
    padding: 18px 20px;
    background: #F7F2E6;
    border: 2px solid transparent;
    border-radius: 14px;
    color: #1a1a18;
    font-size: 17px;
    font-weight: 500;
    font-family: inherit;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    letter-spacing: 0.02em;
}

.wl-input::placeholder {
    color: #B5B5AE;
    font-weight: 400;
}

.wl-input:focus {
    background: #FFFFFF;
    border-color: #5C0003;
    box-shadow: 0 0 0 4px rgba(92, 0, 3, 0.08);
}

.wl-error {
    font-size: 13px;
    color: #ef4444;
    text-align: left;
    padding: 0 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wl-error::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ───── Главная кнопка ───── */
.wl-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #5C0003 0%, #450002 100%);
    color: #fff;
    border: 0;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 24px rgba(92, 0, 3, 0.25);
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.wl-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #7A1A1D 0%, #5C0003 100%);
    opacity: 0;
    transition: opacity 0.25s;
}

.wl-btn > * { position: relative; z-index: 1; }

.wl-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(92, 0, 3, 0.35);
}
.wl-btn:hover:not(:disabled)::after { opacity: 1; }

.wl-btn:active:not(:disabled) {
    transform: translateY(0);
}

.wl-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* ───── Разделитель «или» ───── */
.wl-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0 20px;
    color: #8A8A84;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
}

.wl-divider::before,
.wl-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(92, 0, 3, 0.15), transparent);
}

/* ───── Кнопка «Открыть в Telegram» ───── */
.wl-tg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 1.5px solid rgba(92, 0, 3, 0.1);
    border-radius: 14px;
    color: #1a1a18;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.wl-tg-btn:hover {
    background: #F7F2E6;
    border-color: rgba(92, 0, 3, 0.2);
    transform: translateY(-1px);
}

.wl-tg-btn svg {
    color: #2AABEE;
    flex-shrink: 0;
}

.wl-hint {
    font-size: 12px;
    color: #8A8A84;
    margin: 24px 0 0;
    line-height: 1.5;
    font-weight: 400;
}

/* ───── Поля ввода 4-значного кода ───── */
.wl-code-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 12px 0 16px;
}

.wl-code-input {
    width: 60px;
    height: 70px;
    background: #F7F2E6;
    border: 2px solid transparent;
    border-radius: 14px;
    color: #1a1a18;
    font-size: 30px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    text-align: center;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.wl-code-input:focus {
    background: #FFFFFF;
    border-color: #5C0003;
    box-shadow: 0 0 0 4px rgba(92, 0, 3, 0.1);
    transform: translateY(-2px);
}

.wl-code-input:not(:placeholder-shown),
.wl-code-input[value]:not([value=""]) {
    background: #FFFFFF;
    border-color: rgba(92, 0, 3, 0.2);
    color: #5C0003;
}

.wl-code-input:disabled {
    opacity: 0.6;
}

/* ───── Блок «Не пришёл звонок?» ───── */
.wl-resend-block {
    margin: 24px 0 8px;
    padding: 14px 16px;
    background: rgba(92, 0, 3, 0.04);
    border: 1px solid rgba(92, 0, 3, 0.10);
    border-radius: 12px;
    text-align: center;
}

.wl-resend-block .wl-hint {
    margin: 0 0 10px;
    font-size: 12.5px;
    color: #5C5C58;
    line-height: 1.4;
}

.wl-resend-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #5C0003;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(92, 0, 3, 0.20);
}

.wl-resend-btn:hover:not(:disabled) {
    background: #4A0002;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(92, 0, 3, 0.28);
}

.wl-resend-btn:disabled {
    background: rgba(92, 0, 3, 0.35);
    box-shadow: none;
    cursor: not-allowed;
}

/* ───── Текстовые ссылки-кнопки ───── */
.wl-link-btn {
    display: inline-block;
    background: transparent;
    border: 0;
    color: #5C5C58;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    padding: 10px 16px;
    margin-top: 6px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.wl-link-btn:hover:not(:disabled) {
    color: #5C0003;
    background: rgba(92, 0, 3, 0.04);
}

.wl-link-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ───── Адаптив для мобильных ───── */
@media (max-width: 480px) {
    .web-login-overlay { padding: 12px; }
    .wl-card { padding: 36px 22px 28px; border-radius: 24px; }
    .wl-logo { font-size: 42px; }
    .wl-title { font-size: 22px; }
    .wl-desc { font-size: 13px; padding: 0; }
    .wl-input { padding: 16px 18px; font-size: 16px; }
    .wl-btn { padding: 16px 22px; font-size: 15px; }
    .wl-code-row { gap: 8px; }
    .wl-code-input { width: 54px; height: 64px; font-size: 26px; }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .wl-code-input { width: 48px; height: 58px; font-size: 22px; }
    .wl-code-row { gap: 6px; }
}
