/* Alpine.js cloaking */
[x-cloak] {
    display: none !important;
}

/* Loading states */
.htmx-request .htmx-indicator {
    display: inline-block;
}
.htmx-indicator {
    display: none;
}

/* Map styles */
.leaflet-container {
    font-family: inherit;
}

/* Cookie consent banner styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    display: none;
    animation: slideUp 0.3s ease-out;
}

.cookie-consent-banner.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: #3498db;
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-consent-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.cookie-consent-btn-accept-all {
    background: #27ae60;
    color: white;
}

.cookie-consent-btn-accept-all:hover {
    background: #229954;
}

.cookie-consent-btn-essential {
    background: #95a5a6;
    color: white;
}

.cookie-consent-btn-essential:hover {
    background: #7f8c8d;
}

.cookie-consent-btn-settings {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.cookie-consent-btn-settings:hover {
    background: rgba(255,255,255,0.1);
}

/* Cookie settings modal */
.cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.cookie-settings-modal.show {
    display: flex;
}

.cookie-settings-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    color: #333;
}

.cookie-settings-header {
    margin-bottom: 20px;
}

.cookie-settings-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.cookie-category {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.cookie-category p {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 50px;
    height: 24px;
}

.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: .4s;
    border-radius: 24px;
}

.cookie-toggle-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-toggle-slider {
    background-color: #27ae60;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(26px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-settings-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}


@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
    }

    .cookie-consent-buttons {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-consent-btn {
        flex: 1;
    }
}