/* Cookie Icon */
#cookie-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--violet);
    color: #fff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    text-align: center;
    line-height: 48px;
    font-size: 24px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(127, 61, 210, 0.4);
    transition: background-color var(--transition-speed);
}
#cookie-icon:hover {
    background-color: var(--violet-dark);
}

/* Cookie Panel */
#cookie-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 340px;
    background: var(--lavender-bg);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(127, 61, 210, 0.2);
    padding: 20px;
    z-index: 9998;
    display: none;
    flex-direction: column;
    gap: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all var(--transition-speed) ease-in-out;
    color: var(--text-color);
}

/* Header */
#cookie-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#cookie-panel-header h3 {
    font-size: 16px;
    margin: 0;
}
#cookie-panel-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--violet);
    transition: color var(--transition-speed);
}
#cookie-panel-header button:hover {
    color: var(--violet-dark);
}

/* Description */
.cookie-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

/* Cookie Option Rows */
.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

/* Toggle Switch (Apple-style) */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
}
.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: background-color var(--transition-speed);
    border-radius: 26px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: transform var(--transition-speed);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
input:checked + .slider {
    background-color: var(--violet);
}
input:checked + .slider:before {
    transform: translateX(18px);
}

/* Buttons */
.cookie-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    gap: 8px;
}
.cookie-buttons button {
    flex: 1;
    padding: 10px 14px;
    background-color: var(--violet);
    color: white;
    border: none;
    border-radius: var(--button-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 0 2px 6px rgba(127, 61, 210, 0.3);
}
.cookie-buttons button:hover {
    background-color: var(--violet-dark);
    box-shadow: 0 3px 10px rgba(127, 61, 210, 0.35);
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Cloud-style message */
#cookie-message-wrapper {
    position: fixed;
    bottom: 80px;
    right: 80px;
    z-index: 10000;
}

.cookie-message {
    background-color: #7e57c2;
    color: white;
    padding: 10px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

.cookie-message.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}


/* Mobile Responsive */
@media (max-width: 480px) {
    #cookie-panel {
        right: 10px;
        bottom: 70px;
        width: 90%;
        max-width: 340px;
    }
    #cookie-icon {
        right: 10px;
        bottom: 10px;
    }
}
