/* --- Custom Cookie Settings & Consent Manager CSS --- */

/* Banner Styling */
.yb-cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    color: #222222;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "PingFang SC", "Microsoft YaHei", sans-serif;
    animation: ybSlideUp 0.3s ease-out;
}

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

.yb-cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.yb-cookie-banner-text {
    flex: 1 1 500px;
}

.yb-cookie-banner-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.yb-cookie-banner-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #475569;
}

.yb-cookie-banner-text a {
    color: #2563eb;
    text-decoration: underline;
}

.yb-cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Button Component */
.yb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    outline: none;
}

.yb-btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.yb-btn-primary:hover {
    background-color: #1d4ed8;
}

.yb-btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.yb-btn-secondary:hover {
    background-color: #e2e8f0;
}

.yb-btn-outline {
    background-color: transparent;
    color: #2563eb;
    border-color: #2563eb;
}

.yb-btn-outline:hover {
    background-color: #eff6ff;
}

/* Modal Overlay & Container */
.yb-cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.yb-cookie-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    animation: ybPopIn 0.25s ease-out;
}

@keyframes ybPopIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.yb-cookie-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.yb-cookie-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #0f172a;
}

.yb-modal-close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.yb-modal-close-btn:hover {
    color: #0f172a;
}

.yb-cookie-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.yb-modal-desc {
    margin: 0 0 20px 0;
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.5;
}

.yb-modal-desc a {
    color: #2563eb;
    text-decoration: underline;
}

/* Category Cards */
.yb-cookie-category {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}

.yb-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.yb-category-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #1e293b;
}

.yb-badge-always {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
}

.yb-category-desc {
    margin: 0;
    font-size: 0.825rem;
    color: #64748b;
    line-height: 1.45;
}

/* Toggle Switch Component */
.yb-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

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

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

input:checked + .yb-slider {
    background-color: #2563eb;
}

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

.yb-switch-disabled .yb-slider {
    background-color: #94a3b8;
    cursor: not-allowed;
}

.yb-cookie-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* Floating Badge */
.yb-cookie-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999990;
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.yb-cookie-badge:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .yb-cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }
    .yb-btn {
        width: 100%;
    }
}
