/* Cookie Consent & Legal GDPR Styling - Control Trading Lab */

.ctrl-cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 1140px;
    margin: 0 auto;
    z-index: 99999;
    background: rgba(11, 15, 25, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(79, 70, 229, 0.15);
    padding: 24px 28px;
    color: #e2e8f0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    animation: ctrlFadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ctrlFadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ctrl-cookie-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

@media (min-width: 992px) {
    .ctrl-cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 32px;
    }
}

.ctrl-cookie-text {
    flex: 1;
}

.ctrl-cookie-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ctrl-cookie-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #94a3b8;
    margin: 0;
}

.ctrl-cookie-desc a {
    color: #818cf8;
    text-decoration: underline;
    transition: color 0.2s;
}

.ctrl-cookie-desc a:hover {
    color: #a5b4fc;
}

.ctrl-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ctrl-cookie-btn {
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
    white-space: nowrap;
}

.ctrl-cookie-btn-primary {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.ctrl-cookie-btn-primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.ctrl-cookie-btn-secondary {
    background: #1e293b;
    color: #ffffff;
    border: 1px solid #475569;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.ctrl-cookie-btn-secondary:hover {
    background: #334155;
    color: #ffffff;
    border-color: #64748b;
    transform: translateY(-1px);
}

.ctrl-cookie-btn-ghost {
    background: transparent;
    color: #94a3b8;
    text-decoration: underline;
    padding: 10px 12px;
}

.ctrl-cookie-btn-ghost:hover {
    color: #ffffff;
}

/* MODAL PREFERENCES */
.ctrl-cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: ctrlFadeIn 0.25s ease forwards;
}

@keyframes ctrlFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ctrl-cookie-modal {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    color: #e2e8f0;
}

.ctrl-cookie-modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ctrl-cookie-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.ctrl-cookie-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.ctrl-cookie-modal-close:hover {
    color: #ffffff;
}

.ctrl-cookie-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #94a3b8;
}

.ctrl-cookie-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
}

.ctrl-cookie-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ctrl-cookie-group-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctrl-badge-always-active {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
}

/* CUSTOM SWITCH */
.ctrl-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.ctrl-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ctrl-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155;
    transition: .3s;
    border-radius: 24px;
}

.ctrl-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .ctrl-slider {
    background-color: #4f46e5;
}

input:checked + .ctrl-slider:before {
    transform: translateX(20px);
}

.ctrl-cookie-modal-footer {
    padding: 20px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(15, 23, 42, 0.7);
}

/* Trigger Link in Footer */
.footer-link-cookie {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: none;
}

.footer-link-cookie:hover {
    color: #ffffff;
    text-decoration: underline;
}
