/* === Consent Banner === */
.ips-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background-color: #1a1a2e;
    color: #e0e0e0;
    padding: 16px 24px;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    direction: ltr;
    animation: ips-slide-up 0.4s ease-out;
}

@keyframes ips-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === RTL Support === */
.ips-consent-banner-rtl {
    direction: rtl;
}

.ips-consent-banner-rtl .ips-banner-content {
    flex-direction: row-reverse;
}

.ips-consent-banner-rtl .ips-banner-buttons {
    flex-direction: row-reverse;
}

/* === Banner Layout === */
.ips-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.ips-banner-text {
    flex: 1 1 280px;
    min-width: 0;
    line-height: 1.5;
    font-size: 14px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.ips-banner-text a {
    color: #5dade2;
    text-decoration: underline;
    white-space: normal;
}

.ips-banner-text a:hover {
    color: #85c1e9;
}

/* === Banner Buttons === */
.ips-banner-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.ips-accept-btn,
.ips-decline-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
}

.ips-accept-btn {
    background: #27ae60;
    color: #ffffff;
}

.ips-accept-btn:hover {
    background: #229954;
    transform: translateY(-1px);
}

.ips-decline-btn {
    background: #e74c3c;
    color: #ffffff;
}

.ips-decline-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* === Cookie Settings Button (consent withdrawal) === */
.ips-cookie-settings-btn {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 999997;
    background: #1a1a2e;
    color: #e0e0e0;
    border: 1px solid #3d3d5c;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.ips-cookie-settings-btn:hover {
    background: #2d2d4a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* RTL: move cookie settings button to right side */
[dir="rtl"] .ips-cookie-settings-btn,
.ips-cookie-settings-btn-rtl {
    left: auto;
    right: 16px;
}

/* === Test Reset Button === */
.ips-test-reset {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999998;
}

.ips-reset-btn {
    background: #f39c12;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ips-reset-btn:hover {
    background: #e67e22;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* === Form Checkboxes === */
.ips-consent-checkbox {
    margin: 15px 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}

.ips-consent-checkbox label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    margin: 0 8px !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

.ips-consent-checkbox input[type="checkbox"] {
    margin: 0 !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
}

.ips-consent-checkbox a {
    color: #3498db !important;
    text-decoration: underline !important;
}

.ips-consent-checkbox a:hover {
    color: #2980b9 !important;
}

/* === Responsive === */
@media (max-width: 768px) {
    .ips-consent-banner {
        padding: 12px 16px;
    }

    .ips-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .ips-consent-banner-rtl .ips-banner-content {
        flex-direction: column;
    }

    .ips-banner-text {
        font-size: 13px;
    }

    .ips-banner-buttons {
        width: 100%;
        justify-content: center;
    }

    .ips-accept-btn,
    .ips-decline-btn {
        flex: 1;
        max-width: 120px;
    }

    .ips-test-reset {
        bottom: 10px;
        left: 10px;
    }

    .ips-reset-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    .ips-cookie-settings-btn {
        bottom: 10px;
        left: 10px;
        font-size: 11px;
        padding: 6px 12px;
    }

    [dir="rtl"] .ips-cookie-settings-btn,
    .ips-cookie-settings-btn-rtl {
        left: auto;
        right: 10px;
    }
}
