* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1e293b;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: transparent;
}

.form-container {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.card-header h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
}

.card-header p {
    margin: 0 0 24px 0;
    color: #64748b;
    font-size: 14px;
}

.amount-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 20px;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.currency-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: #d08418;
}

.main-amount-input {
    width: 100%;
    padding: 14px 14px 14px 32px;
    font-size: 20px;
    font-weight: 700;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    background: #f8fafc;
    outline: none;
    transition: all 0.2s;
    color: #1e293b;
    -moz-appearance: textfield;
}

.main-amount-input::-webkit-outer-spin-button,
.main-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.main-amount-input:focus {
    border-color: #2d6a4f;
    background: #fff;
}

.main-amount-input.error {
    border-color: #ef4444;
}

.toggle-switch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.slider {
    width: 40px;
    height: 22px;
    background: #e2e8f0;
    border-radius: 20px;
    position: relative;
    transition: .3s;
}

.slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: .3s;
}

input:checked+.slider {
    background: #de8a15;
}

input:checked+.slider:before {
    transform: translateX(18px);
}

.toggle-text {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.chips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.chip {
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 12px;
    font-weight: 600;
    color: #cc7f13;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.chip.active {
    background: #de8a15;
    color: #fff;
    border-color: #de8a15;
}

.card-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    text-align: center;
}

.card-footer span {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 15px;
    line-height: 1.4;
}

.cancel-auto-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.cancel-auto-btn:hover {
    background: #fff;
    color: #ef4444;
    border-color: #fecaca;
}

h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.sub-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
}

.input-field {
    margin-bottom: 16px;
}

.input-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

input[type="email"],
input[type="text"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: 0.2s;
    font-family: inherit;
}

input.error,
textarea.error {
    border-color: #ef4444;
}

textarea {
    height: 100px;
    resize: none;
}

input:focus,
textarea:focus {
    border-color: #2d6a4f;
}

.agreement-card {
    background: #fdf8f0;
    border: 1px dashed #6a572d;
}

.agreement-card.error-border {
    border-color: #ef4444;
    background: #fef2f2;
}

.warning-box h4 {
    color: #654c16;
    font-size: 15px;
    margin-bottom: 10px;
}

.warning-box p {
    font-size: 13px;
    color: #654916;
    margin-bottom: 12px;
    line-height: 1.5;
}

.warning-box p span {
    color: red;
    font-weight: 700;
}

.checkbox-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    color: #654916;
}

.checkbox-custom input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d58930;
    border-radius: 6px;
    position: relative;
    flex-shrink: 0;
}

input:checked+.checkmark {
    background: #d58930;
}

input:checked+.checkmark:after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.error-message {
    display: none;
    color: #ef4444;
    font-size: 11px;
    margin-top: 4px;
    font-weight: 600;
}

.error-message.visible {
    display: block;
}

.pay-btn {
    width: 100%;
    background: #de8a15;
    color: #fff;
    border: none;
    padding: 20px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(45, 106, 79, 0.2);
    transition: 0.3s;
}

.pay-btn:hover {
    background: #bd7512;
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

#pay-modal,
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

#pay-frame {
    position: relative;
    width: 95%;
    max-width: 500px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    z-index: 1001;
}

#close-pay {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1002;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: #e2e2e2;
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 440px;
    z-index: 1001;
    color: #333;
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #444;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.action-btn {
    border: none;
    background: none;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    color: #555;
}

.action-btn.primary {
    color: #333;
}

#cancel-email {
    background: #f0f0f0;
    border: none;
}

.card-footer span {
    font-weight: 600;
    color: #c48d41;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.offer-link {
    font-weight: 600;
    color: #c48d41;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 1000px) {
    .toggle-text {
        font-size: 11px;
        font-weight: 600;
        color: #64748b;
        max-width: 101px;
        text-align: center;
    }
    .toggle-switch {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        cursor: pointer;
    }
    .amount-box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 24px;
        gap: 0;
    }
}


/* Oferta Modal Styles */

.oferta-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close-oferta-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 1002;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-oferta-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: rotate(90deg);
}

.oferta-header {
    padding: 30px 60px 20px 30px;
    border-bottom: 2px solid #e2e8f0;
}

.oferta-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

.oferta-subtitle {
    margin: 8px 0 0 0;
    font-size: 16px;
    color: #64748b;
    text-align: center;
    font-weight: 600;
}

.oferta-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.oferta-body::-webkit-scrollbar {
    width: 8px;
}

.oferta-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.oferta-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.oferta-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.oferta-date {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}

.oferta-body p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: #475569;
    font-size: 14px;
    text-align: justify;
}

.oferta-body h3 {
    margin: 30px 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.oferta-body h3:first-of-type {
    margin-top: 20px;
}

.oferta-body a {
    color: #de8a15;
    text-decoration: none;
}

.oferta-body a:hover {
    text-decoration: underline;
}

.oferta-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    font-weight: 700;
    color: #1e293b;
    text-align: right;
}

.oferta-important {
    font-weight: 700;
    color: #1e293b;
    background: #fef3c7;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #de8a15;
    margin-top: 20px;
}


/* Адаптивность для мобильных устройств */

@media (max-width: 768px) {
    .oferta-content {
        width: 95%;
        max-height: 85vh;
        border-radius: 16px;
    }
    .oferta-header {
        padding: 25px 50px 15px 20px;
    }
    .oferta-header h2 {
        font-size: 20px;
    }
    .oferta-subtitle {
        font-size: 14px;
    }
    .oferta-body {
        padding: 20px;
    }
    .oferta-body p {
        font-size: 13px;
    }
    .oferta-body h3 {
        font-size: 16px;
        margin: 24px 0 12px 0;
    }
    .close-oferta-btn {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
    .oferta-important {
        font-size: 12px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .oferta-content {
        width: 98%;
        max-height: 90vh;
        border-radius: 12px;
    }
    .oferta-header {
        padding: 20px 45px 12px 15px;
    }
    .oferta-header h2 {
        font-size: 18px;
    }
    .oferta-subtitle {
        font-size: 13px;
    }
    .oferta-body {
        padding: 15px;
    }
    .oferta-body p {
        font-size: 12px;
        line-height: 1.6;
    }
    .oferta-body h3 {
        font-size: 15px;
        margin: 20px 0 10px 0;
    }
    .close-oferta-btn {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 22px;
    }
    .oferta-important {
        font-size: 11px;
        padding: 10px;
    }
}