/* ==========================================
   AequiLex Cookie Consent Styles
   ========================================== */

/* 1. 懸浮橫幅 */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 400px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 99999;
    padding: 20px;
    font-family: 'Inter', sans-serif;
    animation: slideUpCookie 0.5s ease;
}

@keyframes slideUpCookie {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 2. 按鈕樣式 */
.cookie-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cookie-btn-primary {
    background: var(--primary, #1a3d2e);
    color: #ffffff !important;
    border: 1px solid var(--primary, #1a3d2e);
}
.cookie-btn-primary:hover { background: var(--primary-light, #2D5F3F); }

.cookie-btn-outline {
    background: transparent;
    color: var(--text-primary, #1e293b);
    border: 1px solid var(--border-sub, #cbd5e1);
}
.cookie-btn-outline:hover { background: var(--bg-hover, #f8fafc); border-color: var(--border, #e2e8f0); }

.cookie-btn-text {
    background: transparent;
    color: var(--text-muted, #94a3b8);
    border: 1px solid transparent;
    text-decoration: underline;
}
.cookie-btn-text:hover { color: var(--text-primary, #1e293b); }

/* 3. 設定面板 (Modal) */
.cookie-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 100000; display: flex; align-items: center; justify-content: center;
}
.cookie-modal-container {
    background: var(--bg-card, #ffffff); width: 90%; max-width: 500px;
    border-radius: 12px; border: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); overflow: hidden;
}
.cookie-modal-header {
    padding: 20px; border-bottom: 1px solid var(--border, #e2e8f0);
    display: flex; justify-content: space-between; align-items: center;
}
.cookie-modal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.cookie-modal-footer { padding: 20px; border-top: 1px solid var(--border, #e2e8f0); }

.cookie-category {
    margin-bottom: 20px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border-sub, #cbd5e1);
}
.cookie-category:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.cookie-category-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }

/* 4. iOS 風格 Toggle 開關 */
.cookie-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-sub, #cbd5e1); transition: .4s; border-radius: 24px;
}
.cookie-slider:before {
    position: absolute; content: ""; height: 18px; width: 18px;
    left: 3px; bottom: 3px; background-color: white;
    transition: .4s; border-radius: 50%;
}
.cookie-toggle input:checked + .cookie-slider { background-color: var(--primary, #1a3d2e); }
.cookie-toggle input:checked + .cookie-slider:before { transform: translateX(20px); }

/* 手機版適配 */
@media (max-width: 768px) {
    .cookie-banner { bottom: 0; left: 0; max-width: 100%; border-radius: 16px 16px 0 0; border-bottom: none; }
    .cookie-btn { width: 100%; justify-content: center; }
}