/* Accept button normal state */
.btn-accept {
    background-color: #6f42c1 !important;
    color: #ffffff !important;
    border: 1px solid #6f42c1 !important;
}

    /* Hover state */
    .btn-accept:hover {
        background-color: #5a35a0 !important;
        color: #ffffff !important;
        border: 1px solid #5a35a0 !important;
    }

    /* Focus state */
    .btn-accept:focus {
        background-color: #5a35a0 !important;
        color: #ffffff !important;
        border: 1px solid #5a35a0 !important;
        box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
    }

    /* Disabled state */
    .btn-accept.rz-state-disabled {
        background-color: #6f42c1 !important;
        color: #ffffff !important;
        border: 1px solid #6f42c1 !important;
        opacity: 0.6 !important;
    }

    /* Ensure icon stays white */
    .btn-accept .rz-button-icon {
        color: #ffffff !important;
    }

/* Hide all scrollbars on Radzen dialog wrappers */
.rz-dialog,
.rz-dialog-content,
.rz-dialog-wrapper {
    overflow: hidden !important;
}

    .rz-dialog::-webkit-scrollbar,
    .rz-dialog-content::-webkit-scrollbar {
        display: none !important;
    }

.rz-dialog,
.rz-dialog-content {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Hide all scrollbars globally within dialog */
.terms-dialog *::-webkit-scrollbar {
    display: none !important;
}

.terms-dialog * {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.terms-dialog {
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-width: 600px;
    max-width: 700px;
}

.terms-header {
    padding: 28px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

    .terms-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -10%;
        width: 200px;
        height: 200px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
    }

.terms-header-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.terms-header-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.terms-title {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.terms-subtitle {
    margin: 4px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 400;
}

.terms-content {
    padding: 0;
    background: #ffffff;
}

.terms-scroll-area {
    max-height: 320px;
    overflow: auto;
    overflow-x: hidden;
    padding: 32px;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.terms-welcome-banner {
    background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 28px;
    display: flex;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.welcome-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.terms-welcome-banner h6 {
    color: #4c1d95;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.terms-welcome-banner p {
    color: #5b21b6;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.terms-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

    .terms-section:hover {
        border-color: #667eea;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
        transform: translateY(-2px);
    }

.section-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.section-content {
    flex: 1;
}

    .section-content h6 {
        color: #1f2937;
        font-size: 1.05rem;
        font-weight: 700;
        margin: 0 0 8px 0;
        letter-spacing: -0.01em;
    }

    .section-content p {
        color: #4b5563;
        font-size: 0.9rem;
        line-height: 1.7;
        margin: 0;
    }

.terms-footer-note {
    margin-top: 32px;
    padding: 20px;
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

    .terms-footer-note svg {
        color: #f59e0b;
        flex-shrink: 0;
        margin-top: 2px;
    }

    .terms-footer-note span {
        color: #92400e;
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .terms-footer-note a {
        color: #7c3aed;
        text-decoration: none;
        font-weight: 600;
        border-bottom: 1px solid transparent;
        transition: border-color 0.2s ease;
    }

        .terms-footer-note a:hover {
            border-bottom-color: #7c3aed;
        }

.terms-actions {
    padding: 24px 32px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: #f8f9fa;
}

.consent-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.consent-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.consent-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.consent-label {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

    .consent-label:hover {
        color: #764ba2;
    }

.button-wrapper {
    display: flex;
    gap: 12px;
}

.btn-decline {
    min-width: 120px;
    height: 44px;
    font-weight: 600;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

    .btn-decline:hover {
        border-color: #adb5bd;
        background-color: #f8f9fa;
        transform: translateY(-1px);
    }



.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.popup-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
}

    .popup-header h2 {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 0;
    }

.popup-body {
    padding: 30px;
    max-height: calc(80vh - 180px);
    overflow-y: auto;
}

    .popup-body p {
        color: #4b5563;
        line-height: 1.8;
        margin-bottom: 15px;
        font-size: 0.95rem;
    }

        .popup-body p:last-child {
            margin-bottom: 0;
        }

.popup-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    background: #f8f9fa;
}

.btn-close-popup {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn-close-popup:hover {
        background: #5568d3;
        transform: translateY(-1px);
    }

/* Smooth fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terms-dialog {
    animation: fadeIn 0.3s ease-out;
}

.terms-section {
    animation: fadeIn 0.4s ease-out backwards;
}

    .terms-section:nth-child(1) {
        animation-delay: 0.05s;
    }

    .terms-section:nth-child(2) {
        animation-delay: 0.1s;
    }

    .terms-section:nth-child(3) {
        animation-delay: 0.15s;
    }

    .terms-section:nth-child(4) {
        animation-delay: 0.2s;
    }

    .terms-section:nth-child(5) {
        animation-delay: 0.25s;
    }

    .terms-section:nth-child(6) {
        animation-delay: 0.3s;
    }

    .terms-section:nth-child(7) {
        animation-delay: 0.35s;
    }

    .terms-section:nth-child(8) {
        animation-delay: 0.4s;
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    .terms-dialog {
        min-width: 100%;
        max-width: 100%;
    }

    .terms-header {
        padding: 20px 24px;
    }

    .terms-scroll-area {
        padding: 24px;
        max-height: 280px;
    }

    .terms-actions {
        padding: 16px 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .button-wrapper {
        width: 100%;
        flex-direction: column;
    }

    .btn-decline,
    .btn-accept {
        width: 100%;
    }
}
