/* static/css/header.css */

/* Хедер в стиле лендинга — фиксированный, с блюром */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-decoration: none;
    transition: none;
}


.nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Кнопки-призраки */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
}


/* Убираем лишние отступы у формы */
.nav form {
    margin: 0;
    display: inline-flex;
}

/* ---------- МОДАЛЬНОЕ ОКНО ПОКУПКИ (ИСПРАВЛЕНО) ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);        /* более тёмный фон */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;                           /* выше хедера */
    display: none;                          /* по умолчанию скрыто */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Показывается только когда display: flex (через JS) */
.modal-overlay[style*="display: flex"],
.modal-overlay.visible {
    display: flex !important;
}

.modal {
    background: #1a1a1a;                    /* тёмно-серый, а не прозрачный */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    max-width: 480px;
    width: 100%;
    padding: 28px;
    color: #ffffff;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.modal-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: none;
}


.modal-subtitle {
    color: #aaa;
    margin-bottom: 24px;
    font-size: 14px;
}

.modal .field {
    margin-bottom: 24px;
}

.modal .field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.modal .field select,
.modal .field input {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    color: #fff;
    outline: none;
    font-family: inherit;
}

.modal .field input[readonly] {
    background: #222;
    color: #aaa;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
}

.modal-actions button {
    min-width: 120px;
    padding: 14px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: none;
}

.modal-actions .btn-primary {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}
.modal-actions .btn-secondary {
    background: #333;
    color: white;
    border: 1px solid #555;
}


/* Адаптивность */
@media (max-width: 768px) {
    .site-header {
        padding: 0 16px;
    }
    .btn-ghost {
        padding: 6px 12px;
        font-size: 13px;
    }
    .modal {
        padding: 20px;
    }
    .modal-actions {
        flex-direction: column;
    }
    .modal-actions button {
        width: 100%;
    }
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-image {
    height: 55px;
    width: auto;
    display: block;
}

@media (max-width: 480px) {
    .site-header {
        height: 56px;
        padding: 0 12px;
    }
    .logo-image {
        height: 32px;
    }
    .nav {
        gap: 6px;
    }
    .btn-ghost {
        padding: 5px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
}