/* Submit Page Styles */

.submit-container {
    max-width: 800px;
    margin: 40px auto 60px auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(159, 188, 11, 0.12);
    padding: 32px;
    border: 1px solid rgba(159, 188, 11, 0.1);
}

.submit-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.submit-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    color: #555;
    font-weight: 600;
    font-size: 13px;
    border: 2px solid #e8e8e8;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 85px;
}

.submit-tab:hover {
    border-color: var(--main-green);
    background: linear-gradient(145deg, #f0fff0, #ffffff);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.15);
}

.submit-tab.active {
    background: linear-gradient(145deg, #e8f5e9, #ffffff);
    border-color: var(--main-green);
    color: var(--main-green);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.2);
}

.submit-tab .tab-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.submit-tab .tab-text {
    text-align: center;
    line-height: 1.2;
}

.submit-form {
    display: none;
}

.submit-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.form-label.required:after {
    content: ' *';
    color: var(--main-green);
    font-weight: 700;
}

.form-input,
.form-textarea,
select.form-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid #e8e8e8;
    font-size: 15px;
    font-family: inherit;
    background: #ffffff;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-input:hover,
.form-textarea:hover,
select.form-input:hover {
    border-color: #c5c5c5;
}

.form-input:focus,
.form-textarea:focus,
select.form-input:focus {
    border-color: var(--main-green);
    outline: none;
    box-shadow: 0 0 0 4px rgba(159, 188, 11, 0.15);
    background: #ffffff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #aaa;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.photo-upload {
    border: 2px dashed #c5e1a5;
    border-radius: 16px;
    background: linear-gradient(145deg, #f9fdf5, #ffffff);
    padding: 32px;
    text-align: center;
    color: var(--main-green);
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-upload:hover {
    border-color: var(--main-green);
    background: linear-gradient(145deg, #f0f9e8, #ffffff);
    box-shadow: 0 4px 15px rgba(159, 188, 11, 0.1);
}

.photo-upload.dragover {
    border-color: var(--main-green);
    background: #e8f5e9;
    transform: scale(1.01);
}

.photo-upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.photo-upload-text {
    font-size: 14px;
    color: #666;
}

.photo-preview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.photo-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #e8e8e8;
    transition: all 0.2s ease;
}

.photo-thumb:hover {
    border-color: var(--main-green);
    transform: scale(1.05);
}

.lang-switcher {
    float: right;
    margin-top: -12px;
}

/* Стили для тарифов */
.tariff-section {
    margin-top: 32px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 16px;
    border: 1px solid #e9ecef;
}

.balance-info {
    margin-bottom: 20px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-label {
    font-weight: 600;
    color: #495057;
}

.balance-amount {
    font-weight: 700;
    color: var(--main-green);
    font-size: 18px;
}

.tariffs-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.tariff-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.tariff-card:hover {
    border-color: var(--main-green);
    transform: translateY(-2px);
}

.tariff-card.selected {
    border-color: var(--main-green);
    background: #f0f8f0;
}

.tariff-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tariff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tariff-header h3 {
    margin: 0;
    color: #212529;
    font-size: 18px;
}

.tariff-price {
    font-weight: 700;
    color: var(--main-green);
    font-size: 20px;
}

.tariff-features {
    margin-bottom: 12px;
}

.feature {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 4px;
}

.insufficient-funds {
    color: #dc3545;
    font-size: 12px;
    font-weight: 600;
}

.services-container {
    margin-bottom: 20px;
}

.services-container h3 {
    margin-bottom: 16px;
    color: #212529;
}

.service-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.service-item:hover {
    border-color: var(--main-green);
}

.service-item.selected {
    border-color: var(--main-green);
    background: #f0f8f0;
}

.service-item.disabled {
    opacity: 0.5;
}

.service-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.service-checkbox input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.service-text {
    flex: 1;
    font-size: 14px;
    color: #495057;
}

.service-price {
    font-weight: 600;
    color: var(--main-green);
}

.total-section {
    background: #fff;
    border: 2px solid var(--main-green);
    border-radius: 12px;
    padding: 16px;
}

.total-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-weight: 600;
    color: #212529;
    font-size: 16px;
}

.total-amount {
    font-weight: 700;
    color: var(--main-green);
    font-size: 20px;
}

.insufficient-total {
    color: #dc3545;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    text-align: center;
}

/* Стили для загрузки */
.balance-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-style: italic;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid var(--main-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.tariff-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

/* Стили для ошибок и уведомлений */
.form-errors {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    color: #721c24;
}

.error-message ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.error-message li {
    margin-bottom: 4px;
}

.success-notification,
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.success-notification {
    background: #28a745;
}

.error-notification {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Фиксация футера внизу */
.submit-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.forms-section {
    flex: 1;
    margin-bottom: 32px;
}

/* Стили для модального окна пополнения */
.modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    padding: 24px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--main-green);
}

.modal label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.modal input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
}

.modal .btn {
    width: 100%;
    padding: 12px;
    background: var(--main-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.modal-success {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.modal-success.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.modal-success.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 600px) {
    .submit-container {
        padding: 10px 2px;
    }

    .submit-tabs {
        gap: 4px;
    }

    .submit-tab {
        font-size: 14px;
        padding: 8px 10px;
    }

    .tariffs-container {
        grid-template-columns: 1fr;
    }

    .tariff-section {
        padding: 16px;
    }
}