/* 
 * ПДн-Бот: Стили страницы согласий
 * Современный, чистый дизайн
 */

:root {
    --primary: #1565C0;
    --primary-hover: #0d47a1;
    --primary-teal: #26A69A;
    --gradient: linear-gradient(135deg, #1565C0 0%, #26A69A 100%);
    --success: #26A69A;
    --text: #1a1a2e;
    --text-light: #6b7280;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --error: #dc2626;
    --shadow: 0 4px 20px rgba(21, 101, 192, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--gradient);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 32px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    font-size: 48px;
    margin-bottom: 16px;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.company-name {
    color: var(--primary);
    font-weight: 600;
    font-size: 18px;
}

/* Form */
.consent-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-section {
    background: var(--bg);
    padding: 20px;
    border-radius: 12px;
}

.form-section h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

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

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.required {
    color: var(--error);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Consent items */
.consent-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.consent-item:last-child {
    margin-bottom: 0;
}

.consent-item:hover {
    border-color: var(--primary);
}

.required-consent {
    border-left: 3px solid var(--primary);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 12px;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.consent-text {
    flex: 1;
    font-size: 15px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.required-badge {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.doc-link {
    display: block;
    margin-top: 8px;
    margin-left: 32px;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.doc-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Policy block */
.policy-block {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(21, 101, 192, 0.06) 0%, rgba(38, 166, 154, 0.06) 100%);
    border: 1px solid rgba(21, 101, 192, 0.15);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    align-items: flex-start;
}

.policy-block-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.policy-block-content {
    flex: 1;
}

.policy-block-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.policy-block-text {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.policy-block-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
    transition: border-color 0.2s;
}

.policy-block-text a:hover {
    border-bottom-style: solid;
}

.policy-block-law {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: var(--primary);
    opacity: 0.7;
    font-weight: 500;
}

.form-note a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.form-note a:hover {
    text-decoration: underline;
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    letter-spacing: 0.3px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(21, 101, 192, 0.25);
}

.submit-btn:active {
    transform: translateY(0);
}

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

.form-note {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    line-height: 1.5;
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.footer p {
    margin: 4px 0;
}

/* Success page */
.success-card {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    font-size: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.success-card h1 {
    font-size: 28px;
    margin-bottom: 12px;
}

.success-message {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.success-info {
    background: var(--bg);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.success-info p {
    margin: 8px 0;
}

.success-note {
    font-size: 13px;
    color: var(--text-light);
}

/* Document pages */
.document-container {
    justify-content: flex-start;
    padding-top: 40px;
}

.document-card {
    max-width: none;
}

.back-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.document-card h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.document-meta {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.document-content {
    font-size: 15px;
    color: var(--text);
}

.document-content h2 {
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text);
}

.document-content p {
    margin-bottom: 12px;
}

.document-content ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.document-content li {
    margin-bottom: 6px;
}

.document-footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .card {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .header h1 {
        font-size: 20px;
    }

    .consent-item {
        padding: 12px;
    }
}

/* Document pages */
.document-container {
    max-width: 720px;
}

.document-card {
    padding: 32px 36px !important;
}

.document-card h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.document-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.document-content h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 24px 0 10px;
}

.document-content p {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 8px;
}

.document-content ul {
    margin: 8px 0 12px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

.document-content ul li {
    margin-bottom: 4px;
}

.document-content a {
    color: var(--primary);
    text-decoration: none;
}

.document-content a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .document-card {
        padding: 24px 20px !important;
    }

    .document-card h1 {
        font-size: 18px;
    }

    .trust-badges {
        gap: 8px;
    }

    .trust-badge {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* ===== Trust Badges ===== */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 24px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(79, 70, 229, 0.04);
    border: 1px solid rgba(79, 70, 229, 0.12);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.trust-badge:hover {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.2);
}

.trust-icon {
    font-size: 16px;
    line-height: 1;
}

/* ===== Custom Animated Checkboxes ===== */
.consent-item .checkmark {
    position: relative;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: #fff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.consent-item .checkbox-label input:checked+.checkmark {
    background: var(--accent, #10B981);
    border-color: var(--accent, #10B981);
    transform: scale(1.05);
}

.consent-item .checkbox-label input:checked+.checkmark::after {
    content: '';
    display: block;
    width: 6px;
    height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
    animation: checkPop 0.25s ease-out;
}

@keyframes checkPop {
    0% {
        transform: rotate(45deg) scale(0);
        opacity: 0;
    }

    50% {
        transform: rotate(45deg) scale(1.2);
    }

    100% {
        transform: rotate(45deg) scale(1) translate(-1px, -1px);
        opacity: 1;
    }
}