/**
 * Klaro Geo Consent Mode Extension CSS
 */

/* Container for the additional controls */
.klaro-geo-ad-controls {
    margin: 15px 0 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-left: 3px solid #ddd;
    font-size: 0.9em;
    position: relative;
    z-index: 1000;
}

/* Heading in the controls container */
.klaro-geo-ad-controls .klaro-geo-heading {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

/* Description in the controls container */
.klaro-geo-ad-controls .klaro-geo-description {
    font-size: 0.9em;
    margin-bottom: 15px;
    color: #666;
}

/* Toggle control container */
.klaro-geo-toggle-control {
    margin-bottom: 15px;
    margin-left: 5px;
    position: relative;
    z-index: 1000;
}

/* Flex container for label and toggle */
.klaro-geo-toggle-control .klaro-geo-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Label in toggle control */
.klaro-geo-toggle-control label {
    display: block;
    font-weight: bold;
    margin-bottom: 3px;
    flex: 1;
    cursor: pointer;
}

/* Toggle switch container */
.klaro-geo-toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
    z-index: 1001;
}

/* Hide default checkbox */
.klaro-geo-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    z-index: 1002;
}

/* Slider for toggle switch */
.klaro-geo-toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

/* Slider knob */
.klaro-geo-toggle-switch .slider::after {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Checked state for slider */
.klaro-geo-toggle-switch input:checked + .slider {
    background-color: #2196F3;
}

/* Checked state for slider knob */
.klaro-geo-toggle-switch input:checked + .slider::after {
    transform: translateX(16px);
}

/* Description text in toggle control */
.klaro-geo-toggle-control p {
    font-size: 0.8em;
    margin: 0 0 5px 0;
    color: #666;
}

/* Disabled state for controls when parent service is disabled */
.klaro-geo-controls-disabled {
    opacity: 0.6;
    pointer-events: none !important;
    background-color: #f0f0f0 !important;
    border-left-color: #ccc !important;
}

.klaro-geo-controls-disabled .klaro-geo-toggle-control {
    cursor: not-allowed !important;
}

/* Style for disabled individual controls */
.klaro-geo-toggle-control input:disabled + .slider {
    background-color: #ccc !important;
    cursor: not-allowed !important;
}

.klaro-geo-toggle-control input:disabled ~ label {
    color: #999 !important;
    cursor: not-allowed !important;
}

/* Ensure enabled controls are interactive */
.klaro-geo-ad-controls:not(.klaro-geo-controls-disabled) {
    pointer-events: auto !important;
}

.klaro-geo-ad-controls:not(.klaro-geo-controls-disabled) .klaro-geo-toggle-control {
    cursor: pointer !important;
}

/* Add a note about disabled state */
.klaro-geo-controls-disabled::before {
    content: "These options require the main service to be enabled";
    display: block;
    font-style: italic;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 8px;
}