/* Модальные окна и формы */

/* Базовые модальные окна */

/* Контейнеры модальных окон */
.review-modal,
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-modal.active,
.success-modal.active {
    display: flex;
    opacity: 1;
}

/* Backdrop */
.review-modal-backdrop,
.success-modal-backdrop,
.refund-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 13, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: -1;
}

/* Контент модальных окон */
.review-modal-content,
.refund-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 16, 48, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(139, 92, 246, 0.4);
    animation: modalSlideIn 0.3s ease-out;
}

.success-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 16, 48, 0.95) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 24px;
    padding: 50px 40px;
    max-width: 500px;
    width: 90%;
    overflow-y: visible;
    box-shadow: 0 20px 80px rgba(16, 185, 129, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Анимации */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Кнопки закрытия */
.review-modal-close,
.refund-modal-close,
.doc-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(139, 92, 246, 0.9);
    padding: 0;
    outline: none;
    z-index: calc(var(--z-modal) + 1);
    pointer-events: auto;
}

.review-modal-close svg,
.refund-modal-close svg,
.doc-modal-close svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    display: block;
    flex-shrink: 0;
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.review-modal-close:hover,
.refund-modal-close:hover,
.doc-modal-close:hover {
    background: rgba(255, 255, 255, 0.01);
    color: rgba(139, 92, 246, 0.9);
    transform: scale(1.05);
    box-shadow: none;
}


.review-modal-close:active,
.refund-modal-close:active,
.doc-modal-close:active {
    transform: scale(0.95);
    box-shadow: none;
    outline: none;
}

/* Заголовки */
.review-modal-header {
    margin-bottom: 32px;
    padding-right: 60px;
}

.review-modal-header h3 {
    font-family: var(--font-family-heading);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    word-break: keep-all;
    hyphens: none;
}

.review-modal-header p {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(232, 238, 243, 0.75);
    margin: 0;
}

/* Иконка успеха */
.success-icon {
    color: #10B981;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    animation: successPop 0.5s ease-out;
}

.success-icon svg {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    display: block;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5));
}

.success-modal-content h3 {
    font-family: var(--font-family-heading);
    font-size: 28px;
    font-weight: 700;
    color: #10B981;
    margin: 0 auto 16px;
    text-align: center;
    width: 100%;
}

.success-modal-content p {
    font-size: 16px;
    color: rgba(232, 238, 243, 0.8);
    line-height: 1.7;
    margin: 0 auto 30px;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.success-modal-content .btn-close-success {
    width: 100%;
    padding: 14px 32px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.success-modal-content .btn-close-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.success-modal-content .btn-close-success:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Формы в модальных окнах */

/* Базовые формы */
.review-form,
.refund-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.review-form fieldset,
.refund-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Группы полей */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
    margin: 0;
}

.form-group label {
    font-size: 15px;
    font-weight: 600;
    color: rgba(232, 238, 243, 0.95);
    display: block;
    width: 100%;
    text-align: left;
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.2px;
}

.required {
    color: var(--color-secondary);
    margin-left: 2px;
}

/* Поля ввода */
.form-group input,
.form-group textarea,
.refund-form .form-group input,
.refund-form .form-group textarea {
    padding: 16px 20px;
    background: rgba(139, 92, 246, 0.06);
    border: 1.5px solid rgba(139, 92, 246, 0.25);
    border-radius: 14px;
    color: var(--color-text, rgba(232, 238, 243, 0.95));
    font-size: 17px;
    font-family: inherit;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    display: block;
    line-height: normal;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-indent: 0;
}

.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-group input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.form-group input:focus,
.form-group textarea:focus,
.refund-form .form-group input:focus,
.refund-form .form-group textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.6);
    background: rgba(139, 92, 246, 0.12);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 
                0 4px 24px rgba(139, 92, 246, 0.25);
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    opacity: 0;
    visibility: hidden;
    color: transparent;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* Подсказки */
.form-hint {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(232, 238, 243, 0.65);
    margin-top: 4px;
    width: 100%;
    display: block;
}

.form-hint strong {
    color: rgba(232, 238, 243, 0.85);
    font-weight: 600;
}

/* Строки формы */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    align-items: start;
}

.form-row .form-group {
    margin: 0;
    gap: 10px;
}

.form-row .form-group input {
    height: auto;
    min-height: 52px;
}

.refund-form .form-row {
    gap: 16px;
}

/* Рейтинг */
.form-group:has(.rating-input) {
    gap: 2.5px;
}

.rating-input {
    display: flex;
    gap: 10px;
    font-size: 32px;
    align-items: center;
    width: 100%;
}

.rating-star {
    cursor: pointer;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(232, 238, 243, 0.3);
    user-select: none;
    will-change: transform;
}

.rating-star:hover {
    color: #FACC15;
    transform: scale(1.15);
}

.rating-star.active {
    color: #FACC15;
    transform: scale(1.2);
}

/* Счетчик символов */
.char-counter {
    font-size: 13px;
    color: rgba(232, 238, 243, 0.55);
    text-align: right;
    width: 100%;
    margin-top: 6px;
    line-height: 1.4;
}

.char-counter #charCount {
    color: var(--color-primary);
    font-weight: 600;
}

/* Чекбоксы */
.form-group:has(.checkbox-wrapper) {
    margin-top: 0;
    gap: 0;
}

.refund-form .form-group:has(.checkbox-label) {
    margin: 0;
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
}

.refund-form .form-group:has(.checkbox-wrapper) {
    margin: 0;
    gap: 0;
    align-items: stretch;
}

.refund-form .checkbox-wrapper {
    margin-top: 16px;
}

.checkbox-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    cursor: pointer;
    line-height: 1.6;
    position: relative;
    margin-top: 16px;
}

#reviewConsent,
#contactConsent,
#refundConsent {
    margin: 0;
    width: 25px;
    height: 25px;
    min-width: 25px;
    max-width: 25px;
    min-height: 25px;
    max-height: 25px;
    flex-shrink: 0;
    margin-top: 0.15em;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(139, 92, 246, 0.1);
    border: 1.5px solid rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    align-self: flex-start;
    outline: none;
    box-sizing: border-box;
    padding: 0;
}

#reviewConsent:focus,
#reviewConsent:focus-visible,
#contactConsent:focus,
#contactConsent:focus-visible,
#refundConsent:focus,
#refundConsent:focus-visible {
    outline: none;
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: none;
}

#reviewConsent:focus:checked,
#reviewConsent:focus-visible:checked,
#contactConsent:focus:checked,
#contactConsent:focus-visible:checked,
#refundConsent:focus:checked,
#refundConsent:focus-visible:checked {
    border-color: rgba(139, 92, 246, 0.6);
}

#reviewConsent:checked,
#contactConsent:checked,
#refundConsent:checked {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.6);
}

#reviewConsent:checked::after,
#contactConsent:checked::after,
#refundConsent:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

#refundConsent:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
}

.checkbox-wrapper .checkbox-text {
    flex: 1;
    line-height: 1.6;
    padding: 0;
    margin: 0;
    color: rgba(232, 238, 243, 0.9);
    display: block;
    cursor: pointer;
}

.checkbox-wrapper .checkbox-text .link-inline {
    color: rgba(139, 92, 246, 0.9);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.checkbox-wrapper .checkbox-text .link-inline:hover {
    color: rgba(139, 92, 246, 1);
}

/* Чекбокс формы возврата */
.refund-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
    line-height: 1.6;
    position: relative;
    padding: 16px;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 12px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.refund-form .checkbox-label:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.25);
}

.refund-form .checkbox-label .checkbox-text {
    flex: 1;
    line-height: 1.6;
    padding: 0;
    margin: 0;
    color: rgba(232, 238, 243, 0.9);
    font-size: 13px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
    box-sizing: border-box;
}

.refund-form .checkbox-label .checkbox-text .link-inline {
    color: rgba(139, 92, 246, 0.9);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.refund-form .checkbox-label .checkbox-text .link-inline:hover {
    color: rgba(139, 92, 246, 1);
}

/* Select */
.refund-form select {
    padding: 16px 20px;
    padding-right: 45px;
    background: rgba(139, 92, 246, 0.06);
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238B5CF6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    border: 1.5px solid rgba(139, 92, 246, 0.25);
    border-radius: 14px;
    color: var(--color-text, rgba(232, 238, 243, 0.95));
    font-size: 17px;
    font-family: inherit;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.refund-form select:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.6);
    background-color: rgba(139, 92, 246, 0.12);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 
                0 4px 24px rgba(139, 92, 246, 0.25);
}

.refund-form select option {
    background: rgba(26, 26, 46, 0.95);
    color: rgba(232, 238, 243, 0.95);
    padding: 12px;
}

/* Кнопки отправки */
.btn-submit-review {
    margin-top: 8px;
}

.btn-submit-refund {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 8px;
    will-change: transform;
}

.btn-submit-refund:hover:not(:disabled) {
    background: linear-gradient(135deg, #A855F7 0%, #C084FC 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.btn-submit-refund:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Футер формы */
.form-footer-text {
    margin-top: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
}

.form-footer-text small {
    font-size: 12px;
    line-height: 1.6;
    color: rgba(232, 238, 243, 0.6);
    display: block;
}

/* Дополнительные модальные окна */

/* Destiny modal */
.destiny-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.destiny-modal.active {
    display: flex;
    opacity: 1;
}

.destiny-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 13, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: -1;
}

.destiny-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 16, 48, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 24px;
    padding: 20px 40px 32px 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(212, 175, 55, 0.4);
    z-index: 10002;
    box-sizing: border-box;
    animation: modalSlideIn 0.3s ease-out;
}

.destiny-modal-close {
    position: absolute;
    top: 0px;
    right: 4px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: rgba(226, 232, 240, 0.4);
    font-size: 28px;
    font-weight: 300;
    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);
    z-index: 10003;
    padding: 0;
    outline: none;
    pointer-events: auto;
}

.destiny-modal-close:hover {
    background: rgba(255, 255, 255, 0.021);
    color: rgba(226, 232, 240, 0.9);
    transform: scale(1.02);
    box-shadow: none;
}

.destiny-modal-close:active {
    transform: scale(0.95);
    box-shadow: none;
    outline: none;
}

.destiny-modal-header {
    margin-bottom: 20px;
    padding-right: 50px;
    padding-left: 50px;
}

.destiny-modal-title {
    font-family: var(--font-family-serif);
    font-size: 28px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.5px;
    margin: 0;
    text-align: center;
    background: linear-gradient(135deg, 
        #D4AF37 0%,
        #F4E4C1 30%,
        #D4AF37 60%,
        #C9A961 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.destiny-modal-body {
    color: #cbd5e1;
    font-family: var(--font-family-serif);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.destiny-modal-description {
    margin: 0;
    text-align: center;
}

/* Chakra modal */
.chakra-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chakra-modal.active {
    display: flex;
    opacity: 1;
}

.chakra-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 13, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: -1;
}

.chakra-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 16, 48, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    padding: 20px 40px 32px 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(139, 92, 246, 0.4);
    z-index: 10002;
    box-sizing: border-box;
    animation: modalSlideIn 0.3s ease-out;
}

.chakra-modal-close {
    position: absolute;
    top: 0px;
    right: 4px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: rgba(226, 232, 240, 0.4);
    font-size: 28px;
    font-weight: 300;
    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);
    z-index: 10003;
    padding: 0;
    outline: none;
    pointer-events: auto;
}

.chakra-modal-close:hover {
    background: rgba(255, 255, 255, 0.021);
    color: rgba(226, 232, 240, 0.9);
    transform: scale(1.02);
    box-shadow: none;
}

.chakra-modal-close:active {
    transform: scale(0.95);
    box-shadow: none;
    outline: none;
}

.chakra-modal-header {
    margin-bottom: 20px;
    padding-right: 50px;
    padding-left: 50px;
}

.chakra-modal-title {
    font-family: var(--font-family-serif);
    font-size: 28px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.5px;
    margin: 0;
    text-align: center;
    background: linear-gradient(135deg, 
        #D4AF37 0%,
        #F4E4C1 30%,
        #D4AF37 60%,
        #C9A961 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chakra-modal-body {
    color: #cbd5e1;
    font-family: var(--font-family-serif);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.3px;
    text-align: center;
}

.chakra-modal-description {
    margin: 0;
    text-align: center;
}

/* Document modal */
.doc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.doc-modal.active {
    display: flex;
    opacity: 1;
}

.doc-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 13, 26, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: -1;
}

.doc-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 16, 48, 0.98) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    margin: 40px auto;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(139, 92, 246, 0.5);
    z-index: 10003;
    animation: docModalSlideIn 0.3s ease-out;
}

@keyframes docModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-modal-close {
    z-index: 10;
}

.doc-modal-header {
    margin-bottom: 32px;
    padding-right: 60px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding-bottom: 20px;
}

.doc-modal-header h2 {
    font-family: var(--font-family-heading);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.doc-date {
    font-size: 14px;
    color: rgba(232, 238, 243, 0.6);
    margin: 0;
}

.doc-modal-body {
    font-family: var(--font-family-base);
    font-size: 16px;
    line-height: 1.8;
    color: rgba(232, 238, 243, 0.9);
}

.doc-modal-body section {
    margin-bottom: 32px;
}

.doc-modal-body h3 {
    font-family: var(--font-family-heading);
    font-size: 24px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 16px;
    margin-top: 0;
}

.doc-modal-body p {
    margin-bottom: 16px;
    text-align: justify;
}

.doc-modal-body ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.doc-modal-body li {
    margin-bottom: 8px;
}

.doc-modal-body strong {
    color: #f8fafc;
    font-weight: 600;
}

/* Refund modal */
.refund-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.refund-modal.active {
    display: flex;
    opacity: 1;
}

.refund-modal-header {
    margin-bottom: 32px;
    padding-right: 60px;
}

.refund-modal-header h2 {
    font-family: var(--font-family-heading);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.refund-modal-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(232, 238, 243, 0.75);
    margin: 0;
}

/* Success модалки - единые стили для всех */
#refundSuccessModal,
#contactSuccessModal {
    z-index: 10010;
}

/* Scrollbar */

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(16, 185, 129, 0.6) 0%, 
        rgba(5, 150, 105, 0.6) 100%);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(16, 185, 129, 0.9) 0%, 
        rgba(5, 150, 105, 0.9) 100%);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Адаптивность */

/* ПК */
@media (min-width: 1025px) {
    .review-modal-content,
    .refund-modal-content,
    .success-modal-content {
        box-sizing: border-box;
    }
}

/* Планшеты */
@media (max-width: 1024px) and (min-width: 769px) {
    .review-form,
    .refund-form {
        gap: 26px;
    }
    
    .review-form fieldset,
    .refund-form fieldset {
        gap: 26px;
    }
    
    .form-row {
        gap: 14px;
    }
    
    .form-group input,
    .form-group textarea,
    .refund-form .form-group input,
    .refund-form .form-group textarea {
        padding: 15px 18px;
        font-size: 16px;
    }
    
    .rating-input {
        font-size: 30px;
        gap: 9px;
    }
}

/* Мобильные */
@media (max-width: 768px) {
    .review-modal-backdrop,
    .success-modal-backdrop,
    .refund-modal-backdrop,
    .destiny-modal-backdrop,
    .chakra-modal-backdrop,
    .doc-modal-backdrop {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        background: rgba(10, 13, 26, 0.9);
    }
    
    .review-modal,
    .success-modal,
    .refund-modal {
        padding: 0;
        padding-top: max(80px, calc(64px + var(--safe-area-inset-top)));
        padding-bottom: max(20px, var(--safe-area-inset-bottom));
        align-items: flex-start;
        overflow-y: auto;
        box-sizing: border-box;
    }
    
    .review-modal-content,
    .refund-modal-content {
        padding: 24px;
        max-height: calc(100vh - max(80px, calc(64px + var(--safe-area-inset-top))) - max(20px, var(--safe-area-inset-bottom)));
        height: auto;
        min-height: auto;
        width: 95%;
        max-width: 95%;
        border-radius: 16px;
        margin: 0 auto;
        overflow-y: auto;
        box-sizing: border-box;
    }
    
    .success-modal-content {
        padding: 40px 30px;
        height: auto;
        width: 90%;
        max-width: 90%;
        border-radius: 24px;
        margin: 0;
        box-sizing: border-box;
    }
    
    .success-icon {
        width: 70px;
        height: 70px;
        margin: 0 auto 20px;
    }
    
    .success-icon svg {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        max-width: 40px;
        max-height: 40px;
    }
    
    .success-modal-content h3 {
        font-size: 24px;
        margin: 0 auto 16px;
    }
    
    .success-modal-content p {
        font-size: 15px;
        margin: 0 auto 30px;
    }
    
    .review-modal-header {
        margin-bottom: 24px;
        padding-right: 50px;
    }
    
    .review-modal-header h3 {
        font-size: 24px;
        line-height: 1.25;
        letter-spacing: 0.4px;
        margin-bottom: 10px;
        word-break: keep-all;
        hyphens: none;
    }
    
    .review-modal-header p {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .review-modal-close,
    .refund-modal-close,
    .doc-modal-close {
        width: 38px;
        height: 38px;
        top: 8px;
        right: max(8px, var(--safe-area-inset-right));
    }
    
    .review-modal-close svg,
    .refund-modal-close svg,
    .doc-modal-close svg {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
        max-width: 18px;
        max-height: 18px;
    }
    
    .refund-modal-header {
        margin-bottom: 24px;
        padding-right: 50px;
    }
    
    .refund-modal-header h2 {
        font-size: 24px;
    }
    
    .refund-modal-subtitle {
        font-size: 15px;
    }
    
    .destiny-modal,
    .chakra-modal {
        padding-top: max(80px, calc(64px + var(--safe-area-inset-top)));
        padding-bottom: max(20px, var(--safe-area-inset-bottom));
        box-sizing: border-box;
    }
    
    .destiny-modal-content,
    .chakra-modal-content {
        padding: 16px 24px 24px 24px;
        border-radius: 20px;
        max-width: 95%;
    }
    
    .destiny-modal-close,
    .chakra-modal-close {
        top: -4px;
        right: -4px;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
    
    .destiny-modal-header,
    .chakra-modal-header {
        padding-right: 40px;
        margin-bottom: 16px;
    }
    
    .destiny-modal-title,
    .chakra-modal-title {
        font-size: 24px;
    }
    
    .destiny-modal-body,
    .chakra-modal-body {
        font-size: 14px;
    }
    
    .doc-modal {
        padding: 0;
        padding-top: max(80px, calc(64px + var(--safe-area-inset-top)));
        padding-bottom: max(20px, var(--safe-area-inset-bottom));
        box-sizing: border-box;
    }

    .doc-modal-content {
        padding: 24px;
        margin: 10px auto 10px auto;
        max-height: calc(100vh - max(80px, calc(64px + var(--safe-area-inset-top))) - max(20px, var(--safe-area-inset-bottom)) - 20px);
        border-radius: 20px;
    }

    .doc-modal-header {
        margin-bottom: 24px;
        padding-right: 50px;
        padding-bottom: 16px;
    }

    .doc-modal-header h2 {
        font-size: 24px;
    }

    .doc-modal-body {
        font-size: 14px;
        line-height: 1.7;
    }

    .doc-modal-body h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .doc-modal-body section {
        margin-bottom: 24px;
    }

    
    .review-form,
    .refund-form {
        gap: 24px;
    }
    
    .review-form fieldset,
    .refund-form fieldset {
        gap: 24px;
    }
    
    .form-group {
        gap: 9px;
    }
    
    .form-group label {
        font-size: 14px;
        letter-spacing: 0.15px;
    }
    
    .form-group input,
    .form-group textarea,
    .refund-form .form-group input,
    .refund-form .form-group textarea {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .form-hint {
        font-size: 12px;
        margin-top: 4px;
    }
    
    .form-row {
        gap: 12px;
    }
    
    .form-row .form-group input {
        min-height: 50px;
    }
    
    .form-group:has(.rating-input) {
        gap: 2.25px;
    }
    
    .rating-input {
        font-size: 28px;
        gap: 8px;
    }
    
    .rating-star:hover,
    .rating-star.active {
        filter: none;
    }
    
    .char-counter {
        font-size: 12px;
        margin-top: 5px;
    }
    
    .checkbox-wrapper {
        gap: 10px;
        margin-top: 14px;
    }
    
    #reviewConsent,
    #contactConsent,
    #refundConsent {
        width: 22px;
        height: 22px;
        min-width: 22px;
        max-width: 22px;
        min-height: 22px;
        max-height: 22px;
    }
    
    #reviewConsent:checked::after,
    #contactConsent:checked::after,
    #refundConsent:checked::after {
        font-size: 12px;
        width: 12px;
        height: 12px;
    }
    
    .checkbox-wrapper .checkbox-text {
        line-height: 1.5;
    }
    
    .btn-submit-review {
        margin-top: 6px;
    }
    
    .form-footer-text {
        margin-top: 10px;
        padding-top: 16px;
    }
    
    .form-footer-text small {
        font-size: 11px;
    }
    
    .refund-form .form-row {
        grid-template-columns: 1fr;
    }
    
    input:focus[data-hide-cursor-immediately],
    input:focus[data-has-text],
    input:focus[data-first-touch-done],
    textarea:focus[data-has-text],
    textarea:focus[data-first-touch-done] {
        caret-color: transparent;
    }
}

/* Маленькие мобильные */
@media (max-width: 480px) {
    .review-modal-content,
    .refund-modal-content {
        padding: 20px max(20px, var(--safe-area-inset-left)) 20px max(20px, var(--safe-area-inset-right));
    }
    
    .success-modal-content {
        padding: 35px 24px;
        height: auto;
        width: 90%;
        max-width: 95%;
        border-radius: 20px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
        margin: 0 auto 18px;
    }
    
    .success-icon svg {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        max-width: 36px;
        max-height: 36px;
    }
    
    .success-modal-content h3 {
        font-size: 22px;
        margin: 0 auto 14px;
        text-align: center;
        width: 100%;
    }
    
    .success-modal-content p {
        font-size: 14px;
        margin: 0 auto 24px;
        text-align: center;
        width: 100%;
    }
    
    .success-modal-content .btn-close-success {
        padding: 12px 24px;
        font-size: 15px;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
    }
    
    .review-modal-header {
        margin-bottom: 20px;
        padding-right: 45px;
    }
    
    .review-modal-header h3 {
        font-size: 20px;
        line-height: 1.3;
        letter-spacing: 0.3px;
        margin-bottom: 8px;
        word-break: keep-all;
        hyphens: none;
    }
    
    .review-modal-header p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .review-modal-close,
    .refund-modal-close,
    .doc-modal-close {
        width: 36px;
        height: 36px;
        top: 8px;
        right: max(8px, var(--safe-area-inset-right));
    }
    
    .review-modal-close svg,
    .refund-modal-close svg,
    .doc-modal-close svg {
        width: 16px;
        height: 16px;
        min-width: 16px;
        min-height: 16px;
        max-width: 16px;
        max-height: 16px;
    }
    
    .destiny-modal-content,
    .chakra-modal-content {
        padding: 14px 20px 20px 20px;
        border-radius: 16px;
    }
    
    .destiny-modal-close,
    .chakra-modal-close {
        top: -4px;
        right: -4px;
        width: 34px;
        height: 34px;
        font-size: 24px;
    }
    
    .destiny-modal-header,
    .chakra-modal-header {
        padding-right: 35px;
        margin-bottom: 12px;
    }
    
    .destiny-modal-title,
    .chakra-modal-title {
        font-size: 20px;
    }
    
    .destiny-modal-body,
    .chakra-modal-body {
        font-size: 13px;
    }
    
    .doc-modal-content {
        padding: 20px;
        border-radius: 16px;
    }

    .doc-modal-header h2 {
        font-size: 20px;
    }

    .doc-modal-body {
        font-size: 13px;
    }

    .doc-modal-body h3 {
        font-size: 18px;
    }
    
    .refund-modal-header h2 {
        font-size: 20px;
    }
    
    .refund-modal-subtitle {
        font-size: 14px;
    }
    
    .review-form,
    .refund-form {
        gap: 20px;
    }
    
    .review-form fieldset,
    .refund-form fieldset {
        gap: 20px;
    }
    
    .form-group {
        gap: 8px;
    }
    
    .form-group label {
        font-size: 13px;
        letter-spacing: 0.1px;
    }
    
    .form-group input,
    .form-group textarea,
    .refund-form .form-group input,
    .refund-form .form-group textarea {
        padding: 12px 14px;
        font-size: 15px;
        border-radius: 10px;
    }
    
    .form-group textarea {
        min-height: 90px;
    }
    
    .form-hint {
        font-size: 11px;
        margin-top: 3px;
    }
    
    .form-row {
        gap: 10px;
    }
    
    .form-row .form-group input {
        min-height: 48px;
    }
    
    .form-group:has(.rating-input) {
        gap: 2px;
    }
    
    .rating-input {
        font-size: 24px;
        gap: 6px;
    }
    
    .char-counter {
        font-size: 11px;
        margin-top: 4px;
    }
    
    .checkbox-wrapper {
        gap: 10px;
        margin-top: 14px;
    }
    
    #reviewConsent,
    #contactConsent,
    #refundConsent {
        width: 22px;
        height: 22px;
        min-width: 22px;
        max-width: 22px;
        min-height: 22px;
        max-height: 22px;
    }
    
    #reviewConsent:checked::after,
    #contactConsent:checked::after,
    #refundConsent:checked::after {
        font-size: 11px;
        width: 11px;
        height: 11px;
    }
    
    .checkbox-wrapper .checkbox-text {
        line-height: 1.5;
    }
    
    .btn-submit-review {
        margin-top: 4px;
    }
    
    .form-footer-text {
        margin-top: 8px;
        padding-top: 14px;
    }
    
    .form-footer-text small {
        font-size: 10px;
    }
}

/* Очень маленькие мобильные */
@media (max-width: 360px) {
    .review-modal-content,
    .refund-modal-content {
        padding: 16px max(16px, var(--safe-area-inset-left)) 16px max(16px, var(--safe-area-inset-right));
    }
    
    .success-modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }
    
    .success-icon svg {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        max-width: 32px;
        max-height: 32px;
    }
    
    .success-modal-content h3 {
        font-size: 20px;
    }
    
    .success-modal-content p {
        font-size: 13px;
    }
    
    .review-modal-header h3 {
        font-size: 18px;
    }
    
    .review-modal-header p {
        font-size: 13px;
    }
    
    .review-modal-close,
    .refund-modal-close,
    .doc-modal-close {
        width: 34px;
        height: 34px;
        top: 8px;
        right: max(8px, var(--safe-area-inset-right));
    }
    
    .review-modal-close svg,
    .refund-modal-close svg,
    .doc-modal-close svg {
        width: 14px;
        height: 14px;
        min-width: 14px;
        min-height: 14px;
        max-width: 14px;
        max-height: 14px;
    }
    
    .destiny-modal-content,
    .chakra-modal-content {
        padding: 12px 16px 16px 16px;
    }
    
    .destiny-modal-title,
    .chakra-modal-title {
        font-size: 18px;
    }
    
    .destiny-modal-body,
    .chakra-modal-body {
        font-size: 12px;
    }
    
    .doc-modal-content {
        padding: 16px;
    }
    
    .doc-modal-header h2 {
        font-size: 18px;
    }
    
    .doc-modal-body {
        font-size: 12px;
    }
    
    .doc-modal-body h3 {
        font-size: 16px;
    }
    
    .refund-modal-header h2 {
        font-size: 18px;
    }
    
    .refund-modal-subtitle {
        font-size: 13px;
    }
    
    .review-form,
    .refund-form {
        gap: 18px;
    }
    
    .review-form fieldset,
    .refund-form fieldset {
        gap: 18px;
    }
    
    .form-group {
        gap: 7px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input,
    .form-group textarea,
    .refund-form .form-group input,
    .refund-form .form-group textarea {
        padding: 11px 13px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .form-group textarea {
        min-height: 85px;
    }
    
    .form-hint {
        font-size: 10px;
    }
    
    .form-row {
        gap: 8px;
    }
    
    .form-row .form-group input {
        min-height: 46px;
    }
    
    .rating-input {
        font-size: 22px;
        gap: 5px;
    }
    
    .char-counter {
        font-size: 10px;
    }
    
    .checkbox-wrapper {
        gap: 8px;
        margin-top: 12px;
    }
    
    #reviewConsent,
    #contactConsent,
    #refundConsent {
        width: 20px;
        height: 20px;
        min-width: 20px;
        max-width: 20px;
        min-height: 20px;
        max-height: 20px;
    }
    
    #reviewConsent:checked::after,
    #contactConsent:checked::after,
    #refundConsent:checked::after {
        font-size: 10px;
        width: 10px;
        height: 10px;
    }
    
    .btn-submit-review {
        margin-top: 3px;
    }
    
    .form-footer-text {
        margin-top: 6px;
        padding-top: 12px;
    }
    
    .form-footer-text small {
        font-size: 9px;
    }
}
