/* =========================================
   bioERGOtech — Cookie Consent Banner
   ========================================= */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: #fff;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, .12);
    padding: 0;
    transform: translateY(100%);
    transition: transform .5s cubic-bezier(.16, 1, .3, 1);
    font-family: 'Poppins', sans-serif;
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 32px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

@media (max-width: 768px) {
    .cookie-banner-inner {
        flex-direction: column;
        padding: 20px 20px;
        gap: 16px;
    }
}

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

.cookie-banner-text h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.cookie-banner-text p {
    font-size: .85rem;
    color: var(--medium-gray);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--primary);
    text-decoration: underline;
}

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

@media (max-width: 768px) {
    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-banner-actions button {
        flex: 1;
    }
}

.cookie-btn-accept {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.cookie-btn-accept:hover {
    background: var(--primary-dark);
}

.cookie-btn-reject {
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, .15);
    background: transparent;
    color: var(--dark);
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.cookie-btn-reject:hover {
    background: var(--light-gray);
}

.cookie-btn-settings {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--medium-gray);
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.cookie-btn-settings:hover {
    color: var(--dark);
}

/* --- Settings Panel --- */
.cookie-settings-panel {
    display: none;
    border-top: 1px solid rgba(0, 0, 0, .08);
    padding: 20px 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.cookie-settings-panel.open {
    display: block;
}

@media (max-width: 768px) {
    .cookie-settings-panel {
        padding: 16px 20px;
    }
}

.cookie-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-info h4 {
    font-size: .9rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.cookie-category-info p {
    font-size: .8rem;
    color: var(--medium-gray);
    margin: 0;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

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

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--primary);
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: .6;
    cursor: not-allowed;
}

.cookie-settings-save {
    margin-top: 12px;
    text-align: right;
}

/* --- Floating settings trigger (after consent is given) --- */
.cookie-settings-trigger {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--darker);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    transition: all .2s ease;
}

.cookie-settings-trigger.visible {
    display: flex;
}

.cookie-settings-trigger:hover {
    background: var(--primary);
    transform: scale(1.1);
}
