/* Модальные окна в стиле сокровищницы / box (boxInventory: .box-awards-modal), без растровых рамок */

.zic-modal input,
.zic-modal textarea,
.zic-modal select {
    -webkit-user-select: text;
    user-select: text;
}

.zic-modal {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    z-index: 21000;
    width: 100%;
    min-height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
}

.zic-modal[style*="flex"] {
    display: flex !important;
}

.zic-modal__panel {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 440px;
    max-height: min(90vh, 880px);
    margin: auto;
    padding: 28px 22px 24px;
    flex-shrink: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: linear-gradient(180deg, rgba(10, 20, 30, 0.98) 0%, rgba(20, 35, 50, 0.98) 100%);
    border: 1px solid rgba(52, 152, 219, 0.35);
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.zic-modal__panel:focus {
    outline: none;
}

.zic-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(52, 152, 219, 0.4);
    background: rgba(52, 73, 94, 0.65);
    color: #e8f4f8;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.zic-modal__close:hover,
.zic-modal__close:focus-visible {
    background: rgba(231, 76, 60, 0.75);
    border-color: rgba(231, 76, 60, 0.6);
    color: #fff;
    outline: none;
}

.zic-modal__title {
    margin: 0 40px 20px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
    font-size: 22px;
    font-weight: 600;
    color: #f6ffb1;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
}

.zic-modal__text {
    margin: 0 0 16px;
    color: #d4e6f1;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

.zic-modal__body {
    color: #d4e6f1;
}

.zic-modal__footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(52, 152, 219, 0.2);
    text-align: center;
}

.zic-modal__form {
    margin: 0;
}

.zic-field {
    margin-bottom: 14px;
}

.zic-field:last-child {
    margin-bottom: 0;
}

.zic-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #aed6f1;
    letter-spacing: 0.03em;
}

.zic-input {
    box-sizing: border-box;
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    line-height: 1.35;
    color: #e8f4f8;
    background: rgba(52, 152, 219, 0.06);
    border: 1px solid rgba(52, 152, 219, 0.28);
    border-radius: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zic-input::placeholder {
    color: rgba(174, 214, 241, 0.45);
}

.zic-input:hover {
    border-color: rgba(52, 152, 219, 0.45);
}

.zic-input:focus {
    outline: none;
    border-color: rgba(82, 201, 255, 0.65);
    box-shadow: 0 0 0 1px rgba(82, 201, 255, 0.25);
}

.zic-actions {
    margin-top: 20px;
    text-align: center;
}

.zic-btn {
    display: inline-block;
    box-sizing: border-box;
    min-width: 140px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: Arial, Helvetica, sans-serif;
    cursor: pointer;
    border: 2px solid rgba(52, 152, 219, 0.45);
    border-radius: 0;
    background: rgba(52, 152, 219, 0.12);
    color: #52c9ff;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.zic-btn:hover,
.zic-btn:focus-visible {
    background: rgba(52, 152, 219, 0.22);
    border-color: rgba(52, 152, 219, 0.65);
    color: #7ddbff;
    outline: none;
}

.zic-btn:active {
    transform: scale(0.98);
}

.zic-btn--block {
    width: 100%;
    max-width: 300px;
}

.zic-btn--primary {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.35) 0%, rgba(41, 128, 185, 0.35) 100%);
    border-color: rgba(52, 152, 219, 0.55);
    color: #fff;
}

.zic-btn--primary:hover,
.zic-btn--primary:focus-visible {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.55) 0%, rgba(41, 128, 185, 0.55) 100%);
    border-color: rgba(52, 152, 219, 0.85);
    color: #fff;
}

.zic-link {
    color: #7ddbff;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 14px;
    transition: color 0.2s ease;
}

.zic-link:hover,
.zic-link:focus-visible {
    color: #aee9ff;
    outline: none;
}

.zic-alert {
    margin-bottom: 16px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
    border: 1px solid rgba(231, 76, 60, 0.45);
    background: rgba(231, 76, 60, 0.12);
    color: #ffb4a8;
}

.zic-modal__panel::-webkit-scrollbar {
    width: 6px;
}

.zic-modal__panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.zic-modal__panel::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.4);
}

.zic-modal__panel::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.6);
}

@media (max-width: 599px) {
    .zic-modal__panel {
        padding: 24px 16px 20px;
    }

    .zic-modal__title {
        font-size: 18px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .zic-btn {
        font-size: 14px;
        padding: 12px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zic-btn:active {
        transform: none;
    }
}

/* Длинная форма регистрации */
#reg.zic-modal .zic-modal__panel {
    max-width: min(500px, 96vw);
}

.zic-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #ffb4a8;
}
