.consent-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: var(--background-color);
    color: var(--text-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 999999;
    padding: 20px;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid rgba(0,0,0,0.1);
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.consent-content {
    width: 100%;
}

.consent-header {
    margin-bottom: 12px;
}

.consent-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.consent-text {
    margin-bottom: 15px;
}

.consent-text p {
    margin: 0 0 8px 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-color);
}

.consent-subtext {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 8px !important;
}

.privacy-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 8px;
}

.privacy-link:hover {
    text-decoration: none;
}

.consent-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.consent-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    order: 1;
}

.primary-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.secondary-btn {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    order: 2;
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Väike sulgemisnupp */
.consent-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.consent-close:hover {
    background: rgba(0,0,0,0.1);
    color: #666;
}

/* Modal stiilid - parandatud loetavuse jaoks */
.consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75); /* Tumedam taust */
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px); /* Lisatud blur efekt */
}

.modal-content {
    background: #ffffff; /* Kindel valge taust */
    border-radius: 12px;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-header {
    padding: 20px 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #333333;
    font-size: 18px;
    font-weight: 600;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: #666666;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
}

.close-modal:hover {
    color: #333333;
    background: rgba(0, 0, 0, 0.1);
}

.modal-body {
    padding: 25px;
    background: #ffffff;
}

.consent-category {
    margin-bottom: 20px;
    padding: 18px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.consent-category:hover {
    background: #f1f3f4;
    border-color: #dee2e6;
}

.consent-toggle {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 15px;
}

.consent-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 52px;
    height: 28px;
    background: #ccc;
    border-radius: 28px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.consent-toggle input:checked + .toggle-slider {
    background: var(--primary-color, #cc4719);
}

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

.toggle-text {
    flex: 1;
}

.toggle-text strong {
    display: block;
    margin-bottom: 6px;
    color: #333333;
    font-size: 15px;
    font-weight: 600;
}

.toggle-text p {
    margin: 0;
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
}

.modal-footer {
    padding: 20px 25px 25px;
    text-align: center;
    background: #fafafa;
    border-radius: 0 0 12px 12px;
    border-top: 2px solid #f0f0f0;
}

.modal-footer .consent-btn {
    width: auto;
    min-width: 180px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    background: var(--primary-color, #cc4719);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.modal-footer .consent-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
}

/* Responsive disain */
@media (max-width: 768px) {
    .consent-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
    }
    
    .consent-modal {
        padding: 10px;
    }
    
    .modal-content {
        margin: 0;
        width: 100%;
        max-width: none;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 15px 20px 12px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .consent-category {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .toggle-text strong {
        font-size: 14px;
    }
    
    .toggle-text p {
        font-size: 12px;
    }
    
    .modal-footer {
        padding: 15px 20px 20px;
    }
    
    .modal-footer .consent-btn {
        width: 100%;
        min-width: auto;
    }
    
    .consent-buttons {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .consent-banner {
        padding: 15px;
    }
    
    .consent-header h3 {
        font-size: 15px;
    }
    
    .consent-text p {
        font-size: 12px;
    }
    
    .consent-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .consent-modal {
        padding: 5px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .consent-category {
        padding: 12px;
    }
    
    .toggle-slider {
        width: 48px;
        height: 26px;
    }
    
    .toggle-slider::before {
        width: 22px;
        height: 22px;
    }
    
    .consent-toggle input:checked + .toggle-slider::before {
        transform: translateX(22px);
    }
}

/* Kõrgete ekraanide jaoks */
@media (min-height: 800px) {
    .consent-banner {
        bottom: 40px;
    }
}

/* Väikese kõrgusega ekraanide jaoks */
@media (max-height: 600px) {
    .consent-banner {
        bottom: 10px;
        padding: 15px;
    }
}

/* Ensure modal is always above everything */
.consent-modal * {
    box-sizing: border-box;
}

.consent-modal .modal-content {
    background: #ffffff !important;
    color: #333333 !important;
}