/* Cookie Consent Popup Styles for Tangence.in */

/* Overlay */
.tangence-cookie-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease-in-out;
}

.tangence-cookie-overlay.active {
    display: block;
}

/* Cookie Popup Container */
.tangence-cookie-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 420px;
    width: calc(100% - 40px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    animation: slideUp 0.4s ease-out;
    overflow: hidden;
}

.tangence-cookie-popup.active {
    display: block;
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Header */
.tangence-cookie-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.tangence-cookie-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tangence-cookie-icon {
    font-size: 24px;
}

.tangence-cookie-header p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* Body */
.tangence-cookie-body {
    padding: 20px 24px;
}

.tangence-cookie-description {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

/* Cookie Categories */
.tangence-cookie-categories {
    margin: 16px 0;
}

.tangence-cookie-category {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.tangence-cookie-category:hover {
    background: #f3f4f6;
}

.tangence-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.tangence-category-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tangence-category-required {
    font-size: 11px;
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Toggle Switch */
.tangence-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.tangence-toggle-switch.active {
    background: #10b981;
}

.tangence-toggle-switch.disabled {
    background: #3b82f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.tangence-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tangence-toggle-switch.active .tangence-toggle-slider {
    transform: translateX(20px);
}

.tangence-category-description {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
    line-height: 1.4;
    display: none;
}

.tangence-category-description.active {
    display: block;
}

/* Buttons */
.tangence-cookie-actions {
    padding: 16px 24px 24px;
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.tangence-cookie-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.tangence-cookie-btn-primary {
    background: #2563eb;
    color: white;
}

.tangence-cookie-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.tangence-cookie-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.tangence-cookie-btn-secondary:hover {
    background: #e5e7eb;
}

.tangence-cookie-btn-text {
    background: transparent;
    color: #6b7280;
    padding: 8px;
}

.tangence-cookie-btn-text:hover {
    color: #374151;
    background: #f9fafb;
}

/* Footer */
.tangence-cookie-footer {
    padding: 12px 24px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.tangence-cookie-footer a {
    color: #2563eb;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.tangence-cookie-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
    .tangence-cookie-popup {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: 100%;
        width: 100%;
        border-radius: 12px 12px 0 0;
        margin: 0;
    }

    .tangence-cookie-header h3 {
        font-size: 18px;
    }

    .tangence-cookie-actions {
        gap: 8px;
    }
}

/* Accessibility */
.tangence-cookie-popup:focus-within {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.tangence-cookie-btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .tangence-cookie-popup,
    .tangence-cookie-overlay {
        display: none !important;
    }
}
