/* ============ static_css/ekran_nadpis_otzyw.css ============ */
/* ===== МОДАЛЬНОЕ ОКНО ОТЗЫВА / ОТВЕТА ===== */

.msb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.msb-modal-overlay.is-open {
    display: flex;
    animation: msb-fade-in 0.2s ease;
}

@keyframes msb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.msb-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    padding: 24px 24px 20px;
    border-radius: 20px;
    background: #020617;
    color: #e5e7eb;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.7);
    overflow-y: auto;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    animation: msb-slide-up 0.28s cubic-bezier(0.22, 0.9, 0.3, 1.1);
}

@keyframes msb-slide-up {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.msb-modal-dialog::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981);
}

/* ===== ХЕДЕР МОДАЛКИ ===== */

.msb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.65);
}

.msb-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.msb-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5f5;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.msb-modal-close:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fee2e2;
    transform: rotate(90deg);
}

.msb-modal-body {
    padding: 0;
}

/* ===== БАЗА ДЛЯ ФОРМЫ КОММЕНТАРИЯ ===== */

#respond {
    background: transparent;
    margin: 0;
}

.msb-comment-form,
#commentform {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* заголовок формы ("Оставьте короткий отзыв") */
.comment-respond h3.msb-form-title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f9fafb;
}

/* инфо "Вы вошли как..." */
.logged-in-as {
    margin: 0 0 12px;
    padding: 10px 12px;
    font-size: 0.8rem;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(51, 65, 85, 0.7);
}

.logged-in-as a {
    color: #60a5fa;
    font-weight: 500;
    text-decoration: none;
}

.logged-in-as a:hover {
    text-decoration: underline;
}

/* ===== РЯДЫ И ПОЛЯ ===== */

.msb-form-row,
.msb-form-row-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.msb-form-row-compact {
    margin-bottom: 4px;
}

.msb-form-field {
    flex: 1 1 0;
    min-width: 0;
}

.msb-form-field-full {
    flex: 0 0 100%;
    min-width: 100%;
}

.msb-form-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
}

.msb-form-field textarea,
.msb-form-field input[type="text"],
.msb-form-field input[type="email"],
.msb-form-field select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(51, 65, 85, 0.9);
    padding: 10px 14px;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.06s ease;
    font-family: inherit;
}

.msb-form-field textarea {
    min-height: 90px;
    resize: vertical;
    line-height: 1.5;
}

.msb-form-field textarea::placeholder,
.msb-form-field input::placeholder {
    color: #64748b;
    font-size: 0.8rem;
}

.msb-form-field textarea:focus,
.msb-form-field input:focus,
.msb-form-field select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);
    background: #020617;
    transform: translateY(-1px);
}

/* чекбокс "запомнить меня" */
.comment-form-cookies-consent {
    margin: 0;
    font-size: 0.78rem;
    color: #9ca3af;
}

.comment-form-cookies-consent input {
    margin-right: 6px;
}

/* ===== ЗВЁЗДНЫЙ РЕЙТИНГ ===== */

.msb-rating-row {
    margin-top: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.15), transparent 55%),
                rgba(15, 23, 42, 0.9);
}

.msb-rating-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 2px;
    position: relative;
}

.msb-rating-stars input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.msb-rating-stars label {
    font-size: 1.9rem;
    cursor: pointer;
    color: #475569;
    transition: transform 0.15s ease, color 0.15s ease;
}

.msb-rating-stars label:hover,
.msb-rating-stars label:hover ~ label {
    color: #facc15;
    transform: translateY(-2px) scale(1.05);
}

.msb-rating-stars input[type="radio"]:checked ~ label {
    color: #facc15;
}

/* ===== ФАЙЛЫ (простая версия, без предпросмотра) ===== */

.msb-media-field input[type="file"] {
    border-radius: 12px;
    border: 1px dashed rgba(71, 85, 105, 0.9);
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    width: 100%;
    cursor: pointer;
    font-size: 0.8rem;
}

.msb-media-field input[type="file"]:hover {
    border-color: #60a5fa;
    background: rgba(15, 23, 42, 0.95);
}

/* ===== ОШИБКИ ВАЛИДАЦИИ ===== */

.msb-form-error {
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    border-left: 3px solid #ef4444;
    background: rgba(248, 113, 113, 0.1);
    color: #fecaca;
    font-size: 0.78rem;
}

/* ===== КНОПКА ОТПРАВКИ ===== */

/* контейнер внизу формы */
.form-submit,
.msb-form-submit {
    margin-top: 18px !important;
    padding-top: 14px;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    text-align: right;
}

/* наша кастомная кнопка */
.msb-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 180px;
    padding: 11px 22px;
    border-radius: 999px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #10b981, #22c55e);
    color: #ecfdf5;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.5);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

/* если вдруг остаётся стандартный input[type="submit"] — красим его так же */
.form-submit input[type="submit"] {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 11px 22px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #10b981, #22c55e);
    color: #ecfdf5;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.5);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.msb-submit-button:hover,
.form-submit input[type="submit"]:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 14px 36px rgba(16, 185, 129, 0.65);
}

.msb-submit-button:active,
.form-submit input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 7px 18px rgba(16, 185, 129, 0.45);
}

/* выключенная кнопка (когда JS добавляет класс) */
.msb-submit-button.msb-button-disabled,
.form-submit input[type="submit"].msb-button-disabled {
    cursor: not-allowed;
    background: linear-gradient(135deg, #4b5563, #6b7280);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.7);
    filter: none;
    transform: none;
}

/* чтобы кнопка была внизу при длинном тексте */
#commentform {
    min-height: 360px;
}

/* ===== АДАПТИВ ===== */

@media (max-width: 768px) {
    .msb-modal-dialog {
        margin: 0 10px;
        padding: 18px 16px 16px;
        border-radius: 16px;
    }

    .msb-modal-title {
        font-size: 1.15rem;
    }

    .msb-modal-close {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }

    .msb-form-row-compact {
        flex-direction: column;
    }

    .msb-rating-stars label {
        font-size: 1.7rem;
    }

    .form-submit,
    .msb-form-submit {
        text-align: center;
    }

    .msb-submit-button,
    .form-submit input[type="submit"] {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .msb-modal-dialog {
        padding: 14px 14px 12px;
        border-radius: 14px;
    }

    .msb-modal-title {
        font-size: 1.05rem;
    }

    .msb-form-field textarea,
    .msb-form-field input,
    .msb-form-field select {
        font-size: 0.84rem;
        padding: 9px 12px;
    }
}

/* скролл внутри модалки */
.msb-modal-dialog::-webkit-scrollbar {
    width: 6px;
}

.msb-modal-dialog::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 3px;
}

.msb-modal-dialog::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 3px;
}
