/**
 * JAPAN-SPEC - Стили модального окна быстрого заказа
 * @version 1.0.0
 */

/* ========================================
   МОДАЛЬНОЕ ОКНО
   ======================================== */
.jspec-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.jspec-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.jspec-modal-content {
    position: relative;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--jspec-brand, #06122a);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(138, 155, 174, 0.15);
    animation: jspec-modal-slideIn 0.3s ease;
}

@keyframes jspec-modal-slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jspec-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--jspec-text-muted, #a0aec0);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.jspec-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--jspec-text, #ffffff);
    transform: rotate(90deg);
}

/* ========================================
   ЗАГОЛОВОК МОДАЛКИ
   ======================================== */
.jspec-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.jspec-modal-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.jspec-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--jspec-text, #ffffff);
    margin: 0 0 0.5rem 0;
}

.jspec-modal-product {
    font-size: 0.95rem;
    color: var(--jspec-text-muted, #a0aec0);
    margin: 0;
}

/* ========================================
   ФОРМА МОДАЛКИ
   ======================================== */
.jspec-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.jspec-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.jspec-form-row label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--jspec-text-muted, #a0aec0);
}

.jspec-form-row input,
.jspec-form-row textarea {
    padding: 0.875rem 1rem;
    background: var(--jspec-bg-card, rgba(13, 31, 60, 0.6));
    border: 1px solid var(--jspec-border, rgba(138, 155, 174, 0.3));
    border-radius: 10px;
    color: var(--jspec-text, #ffffff);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.jspec-form-row input:focus,
.jspec-form-row textarea:focus {
    outline: none;
    border-color: var(--jspec-accent, #4a90d9);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(74, 144, 217, 0.25);
}

.jspec-form-row input::placeholder,
.jspec-form-row textarea::placeholder {
    color: var(--jspec-text-muted, #a0aec0);
    opacity: 0.5;
}

.jspec-form-row textarea {
    resize: vertical;
    min-height: 60px;
}

/* ========================================
   ЧЕКБОКС В МОДАЛКЕ
   ======================================== */
.jspec-form-checkbox {
    margin-top: 0.5rem;
}

.jspec-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--jspec-text-muted, #a0aec0);
    font-size: 0.85rem;
}

.jspec-checkbox-label input[type="checkbox"] {
    display: none;
}

.jspec-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(138, 155, 174, 0.4);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.jspec-checkbox-label input:checked+.jspec-checkbox-custom {
    background: linear-gradient(135deg, var(--jspec-accent, #4a90d9), var(--jspec-accent-hover, #5ba0e9));
    border-color: var(--jspec-accent, #4a90d9);
}

.jspec-checkbox-label input:checked+.jspec-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.jspec-checkbox-text a {
    color: var(--jspec-accent, #4a90d9);
    text-decoration: underline;
}

.jspec-checkbox-text a:hover {
    color: var(--jspec-accent-hover, #5ba0e9);
}

/* ========================================
   КНОПКА МОДАЛКИ
   ======================================== */
.jspec-modal-btn {
    margin-top: 0.5rem;
    padding: 1rem 2rem;
    background:
        linear-gradient(135deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.8) 45%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.8) 55%, transparent 60%, transparent 100%),
        linear-gradient(135deg, transparent 0%, transparent 70%, rgba(255, 255, 255, 0.4) 75%, transparent 80%, transparent 100%),
        linear-gradient(180deg, #c8cdd3 0%, #b0b8c0 15%, #97a0a9 35%, #7a838c 60%, #5a6570 85%, #4a5560 100%);
    border: none;
    border-radius: 10px;
    color: #333;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(74, 85, 96, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.jspec-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 85, 96, 0.6), inset 0 1px 0 rgba(255, 255, 255, 1), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.jspec-modal-btn:active {
    transform: translateY(0);
}

.jspec-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.jspec-modal-btn-secondary {
    background: transparent;
    border: 2px solid rgba(138, 155, 174, 0.4);
    color: var(--jspec-text-muted, #a0aec0);
    text-shadow: none;
    box-shadow: none;
}

.jspec-modal-btn-secondary:hover {
    border-color: var(--jspec-accent, #4a90d9);
    color: var(--jspec-text, #ffffff);
    background: rgba(74, 144, 217, 0.1);
}

/* ========================================
   УСПЕШНАЯ ОТПРАВКА
   ======================================== */
.jspec-modal-success {
    text-align: center;
    padding: 1rem 0;
}

.jspec-success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.jspec-modal-success h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--jspec-text, #ffffff);
    margin: 0 0 0.5rem 0;
}

.jspec-modal-success p {
    color: var(--jspec-text-muted, #a0aec0);
    margin: 0 0 1.5rem 0;
}

/* ========================================
   DISCLAIMER
   ======================================== */
.jspec-modal-disclaimer {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--jspec-text-muted, #a0aec0);
    text-align: center;
    opacity: 0.7;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */
@media (max-width: 640px) {
    .jspec-modal-content {
        width: 95%;
        padding: 1.5rem;
        border-radius: 16px;
    }

    .jspec-modal-title {
        font-size: 1.25rem;
    }

    .jspec-modal-icon {
        font-size: 2.5rem;
    }
}