/* Стили для индикатора загрузки */
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit.loading {
    position: relative;
    color: transparent !important;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Стили для успешного сообщения */
.form-success-message {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Стили для окна согласия (если будет использоваться модалка) */
.pd-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pd-consent-modal__content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================================================
   СТИЛИ ДЛЯ СИСТЕМЫ СОГЛАСИЯ НА ОБРАБОТКУ ПДН
   ============================================================================ */

/* ОКНО СОГЛАСИЯ (POPUP РЕЖИМ) */
body.pd-popup-mode {
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pd-popup-mode .container {
    max-width: 100%;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.pd-popup-mode .agreement-text {
    flex-grow: 1;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    line-height: 1.7;
    font-size: 15px;
}

/* КНОПКИ В POPUP РЕЖИМЕ */
.pd-popup-mode .btn {
    padding: 15px 30px;
    font-size: 18px;
    margin: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
    min-width: 200px;
}

.pd-popup-mode .btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.pd-popup-mode .btn-success:hover {
    background: linear-gradient(135deg, #219653 0%, #1e8449 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.pd-popup-mode .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.pd-popup-mode .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* ФОРМА СОГЛАСИЯ В POPUP */
.pd-modal-container	{width: 660px;}
.pd-modal-header h3, .pd-consent-text h3 {font-size: 1.4rem; margin:10px 0 auto;}
.pd-consent-text h4 {font-size: 1.3rem; margin:10px 0 auto;}
.pd-consent-text p, .pd-consent-text li, .pd-consent-text a  {    font-size: 1.1rem; }

.pd-popup-mode form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-top: 20px;
    border: 2px solid #e9ecef;
}

.pd-popup-mode .form-checkbox {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #dee2e6;
    transition: border-color 0.3s;
}

.pd-popup-mode .form-checkbox:hover {
    border-color: #3498db;
}

.pd-popup-mode .form-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    accent-color: #27ae60;
    cursor: pointer;
}

.pd-popup-mode .form-checkbox label {
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {

.pd-modal-container	{width: 600px;}
	
    .pd-popup-mode {
        padding: 10px;
    }
    
    .pd-popup-mode .container {
        padding: 15px;
        border-radius: 8px;
        min-height: calc(100vh - 20px);
    }
    
    .pd-popup-mode .agreement-text {
        max-height: 50vh;
        font-size: 14px;
        padding-right: 5px;
    }
    
    .pd-popup-mode .btn {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
        margin: 8px 0;
        min-width: unset;
    }
    
    .pd-popup-mode form {
        padding: 15px;
    }
    
    .pd-popup-mode .form-checkbox {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pd-popup-mode .form-checkbox input[type="checkbox"] {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .pd-popup-mode .agreement-text {
        max-height: 55vh;
        font-size: 13px;
    }
    
    .pd-popup-mode h1 {
        font-size: 22px;
    }
    
    .pd-popup-mode .btn {
        padding: 10px 15px;
        font-size: 15px;
    }
}

/* АНИМАЦИИ ДЛЯ POPUP */
@keyframes pdFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pdPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pd-popup-mode .alert-success {
    animation: pdFadeIn 0.5s ease-out;
}

.pd-popup-mode #submitBtn:not(:disabled):hover {
    animation: pdPulse 0.3s ease;
}

/* СКРОЛЛБАР ДЛЯ ТЕКСТА СОГЛАСИЯ */
.pd-popup-mode .agreement-text::-webkit-scrollbar {
    width: 8px;
}

.pd-popup-mode .agreement-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.pd-popup-mode .agreement-text::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.pd-popup-mode .agreement-text::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ИНДИКАТОР ЗАГРУЗКИ ДЛЯ КНОПКИ */
.pd-popup-mode .btn-loading {
    position: relative;
    color: transparent !important;
}

.pd-popup-mode .btn-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: pdSpin 1s linear infinite;
}

@keyframes pdSpin {
    to { transform: rotate(360deg); }
}

/* СТАТУСЫ */
.pd-consent-confirmed .form-checkbox {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.pd-consent-confirmed .form-checkbox label {
    color: #28a745;
}

/* ССЫЛКА НА ПОЛНУЮ ВЕРСИЮ */
.pd-full-version-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.pd-full-version-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pd-full-version-link a:hover {
    text-decoration: underline;
}

/* УВЕДОМЛЕНИЯ */
.pd-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 99999;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    animation: pdSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 450px;
    min-width: 300px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.pd-notification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pd-notification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.pd-notification-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

@keyframes pdSlideIn {
    from {
        transform: translateX(100%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

/* Стили для успешного сообщения */
.form-success-message {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Индикатор загрузки для кнопки */
.btn-submit.loading {
    position: relative;
    color: transparent !important;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Уведомления - общие стили */
.pd-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 99999;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    animation: pdSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 450px;
    min-width: 300px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.pd-notification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pd-notification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}
.pd-notification-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

@keyframes pdSlideIn {
    from {
        transform: translateX(100%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

/* Ссылка на полную версию */
.pd-full-version-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.pd-full-version-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pd-full-version-link a:hover {
    text-decoration: underline;
}

.consent-confirmed-badge {
    display: inline-block;
    color: #27ae60;
    font-weight: normal;
}
.consent-link {
    cursor: pointer;
    text-decoration: underline;
}
.consent-link--disabled {
    pointer-events: none;
    opacity: 0.7;
}