/**
 * Copyright © IVH. All rights reserved.
 */

.ivh-cookie-consent-banner {
    position: fixed;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    font-family: Arial, sans-serif;
    max-width: 100%;
    box-sizing: border-box;
}

/* Position variants */
.ivh-cookie-consent-banner.position-top {
    top: 0;
    left: 0;
    right: 0;
}

.ivh-cookie-consent-banner.position-bottom {
    bottom: 0;
    left: 0;
    right: 0;
}

.ivh-cookie-consent-banner.position-top-left {
    top: 20px;
    left: 20px;
    max-width: 400px;
}

.ivh-cookie-consent-banner.position-top-right {
    top: 20px;
    right: 20px;
    max-width: 400px;
}

.ivh-cookie-consent-banner.position-bottom-left {
    bottom: 20px;
    left: 20px;
    max-width: 400px;
}

.ivh-cookie-consent-banner.position-bottom-right {
    bottom: 20px;
    right: 20px;
    max-width: 400px;
}

/* Layout variants */
.ivh-cookie-consent-banner.layout-bar .cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ivh-cookie-consent-banner.layout-box .cookie-banner-content {
    text-align: center;
}

.ivh-cookie-consent-banner.layout-cloud {
    border-radius: 15px;
}

.ivh-cookie-consent-banner.layout-cloud .cookie-banner-content {
    text-align: center;
}

.cookie-text {
    flex: 1;
    margin-right: 20px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.layout-box .cookie-text,
.layout-cloud .cookie-text {
    margin-right: 0;
    margin-bottom: 20px;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.layout-box .cookie-actions,
.layout-cloud .cookie-actions {
    justify-content: center;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
    min-width: 120px;
}

.cookie-btn-accept {
    background-color: #28a745;
    color: white;
}

.cookie-btn-accept:hover {
    background-color: #218838;
}

.cookie-btn-reject {
    background-color: #dc3545;
    color: white;
}

.cookie-btn-reject:hover {
    background-color: #c82333;
}

.cookie-btn-individual {
    background-color: #6c757d;
    color: white;
}

.cookie-btn-individual:hover {
    background-color: #5a6268;
}

/* Modal Styles */
.ivh-cookie-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.cookie-modal-content {
    background-color: #fff;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.cookie-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    margin: 0;
    color: #333;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    color: #333;
}

.cookie-modal-body {
    padding: 20px;
}

.cookie-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.cookie-category {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f5f5f5;
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.cookie-category-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Toggle Switch Styles */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #28a745;
}

input:focus + .slider {
    box-shadow: 0 0 1px #28a745;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Disabled switch */
.cookie-switch.disabled .slider {
    cursor: not-allowed;
    background-color: #28a745;
}

.cookie-switch.disabled input:checked + .slider:before {
    transform: translateX(26px);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .ivh-cookie-consent-banner {
        padding: 15px;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-text {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .cookie-actions {
        justify-content: center;
    }
    
    .cookie-btn {
        min-width: 100px;
        margin-bottom: 5px;
    }
    
    .cookie-modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media screen and (max-width: 480px) {
    .cookie-actions {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}
