/* UI elements are hidden by default to prevent flashing on cached pages before JS runs */
#dpdp-cmp-banner, #dpdp-floating-btn { display: none; }

#dpdp-cmp-banner {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #111827; color: #ffffff;
    padding: 24px; box-sizing: border-box;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.2);
}
.dpdp-cmp-content {
    max-width: 1200px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 16px;
}
@media (min-width: 768px) {
    .dpdp-cmp-content { flex-direction: row; align-items: center; justify-content: space-between; }
}
.dpdp-cmp-text h3 { margin: 0 0 8px 0; font-size: 18px; color: white; }
.dpdp-cmp-text p { margin: 0; font-size: 14px; color: #9ca3af; line-height: 1.5; }
.dpdp-cmp-buttons { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }

.dpdp-btn {
    padding: 10px 20px; border-radius: 6px;
    font-weight: 600; font-size: 14px; cursor: pointer;
    border: none; transition: opacity 0.2s;
}
.dpdp-btn:hover { opacity: 0.9; }
.dpdp-btn-reject { background: #374151; color: white; border: 1px solid #4b5563; }
.dpdp-btn-customize { background: transparent; color: #9ca3af; border: 1px solid #4b5563; }
.dpdp-btn-accept { background: #10b981; color: white; }

/* Customize Modal */
#dpdp-cmp-modal {
    display: none; position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1000000;
    align-items: center; justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.dpdp-modal-content {
    background: white; color: #111827;
    width: 90%; max-width: 500px;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.dpdp-modal-header { padding: 20px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; }
.dpdp-modal-header h3 { margin: 0; font-size: 18px; }
.dpdp-close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: #6b7280; }
.dpdp-modal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.dpdp-category { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-start; }
.dpdp-category-text h4 { margin: 0 0 4px 0; font-size: 16px; }
.dpdp-category-text p { margin: 0; font-size: 13px; color: #6b7280; }
.dpdp-modal-footer { padding: 20px; background: #f9fafb; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; }

/* Toggle switch */
.dpdp-toggle {
    position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; margin-left: 16px;
}
.dpdp-toggle input { opacity: 0; width: 0; height: 0; }
.dpdp-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #d1d5db; transition: .4s; border-radius: 24px;
}
.dpdp-slider:before {
    position: absolute; content: ""; height: 18px; width: 18px;
    left: 3px; bottom: 3px; background-color: white;
    transition: .4s; border-radius: 50%;
}
input:checked + .dpdp-slider { background-color: #10b981; }
input:checked + .dpdp-slider:before { transform: translateX(20px); }
input:disabled + .dpdp-slider { background-color: #10b981; opacity: 0.5; cursor: not-allowed; }

/* Floating button */
#dpdp-floating-btn {
    position: fixed; bottom: 20px; left: 20px;
    background: #111827; color: white;
    padding: 10px 14px; border-radius: 24px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 999998; border: 1px solid #374151;
    align-items: center; gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#dpdp-floating-btn:hover { background: #1f2937; }
