/* DGC Cookie Banner Styles */
#dgc-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    /* Include padding in width */
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 999999;
    font-family: inherit;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

#dgc-cookie-banner.dgc-position-top {
    top: 0;
    bottom: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#dgc-cookie-banner .dgc-content {
    flex: 1;
    font-size: 14px;
    color: #000;
}

#dgc-cookie-banner .dgc-content h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    padding: 0;
    color: #000;
}

#dgc-cookie-banner .dgc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    /* Ensure buttons stay in one line on desktop */
    flex-shrink: 0;
    /* Prevent actions from shrinking */
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    #dgc-cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    #dgc-cookie-banner .dgc-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
        flex-wrap: wrap;
    }

    .dgc-btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

.dgc-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    /* Prevent text wrapping inside buttons */
}

.dgc-btn-accept {
    background-color: #0073aa;
    color: #fff;
}

.dgc-btn-deny {
    background-color: #f0f0f1;
    color: #333;
}

.dgc-btn-settings {
    background-color: #f0f0f1;
    color: #333;
    text-decoration: none;
}

/* Floating Settings Trigger */
#dgc-cookie-settings-trigger {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    /* Changed from right to left to position in bottom-left corner */
    width: 50px !important;
    height: 50px !important;
    background-color: #0073aa !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 999998 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    display: none;
    /* Hidden by default, shown by JS when cookie consent exists */
}

/* Add more specific positioning to ensure it doesn't stretch */
#dgc-cookie-settings-trigger,
#dgc-cookie-settings-trigger * {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure the trigger is visible when shown by JavaScript */
#dgc-cookie-settings-trigger:visible,
#dgc-cookie-settings-trigger[style*='display: block'],
#dgc-cookie-settings-trigger[style*='display: flex'] {
    display: flex !important;
}

#dgc-cookie-settings-trigger svg {
    width: 24px;
    height: 24px;
    fill: white;
}

#dgc-cookie-settings-trigger:hover {
    background-color: #005a87;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* Cookie Settings Modal Improvements */
.dgc-switch-group {
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.dgc-switch-group:last-child {
    border-bottom: none;
}

.dgc-switch-group .dgc-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 18px;
}

.dgc-switch-group .dgc-description {
    font-size: 14px;
    color: #000;
    margin: 5px 0 0 0;
    line-height: 1.4;
}

.dgc-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 15px;
    vertical-align: middle;
}

.dgc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.dgc-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 24px;
}

.dgc-switch .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

.dgc-switch input:checked+.slider {
    background-color: #0073aa;
}

.dgc-switch input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Modal for Settings */
#dgc-cookie-settings-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    z-index: 1000000;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: none;
}

#dgc-cookie-settings-modal.active {
    display: block;
}

.dgc-modal-header {
    position: relative;
    margin-bottom: 20px;
}

.dgc-modal-header h2 {
    margin: 0;
    padding-right: 40px;
    font-size: 24px;
    /* Space for close button */
}

.dgc-close {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.2s;
}

.dgc-close:hover {
    color: #333;
}

.dgc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: none;
}

.dgc-overlay.active {
    display: block;
}