/* Consent Banner Styles */
:root {
    --consent-bg: #ffffff;
    --consent-text: #1f2937;
    --consent-border: #e5e7eb;
    --consent-primary: #f97316;
    /* Orange */
    --consent-primary-hover: #ea580c;
    --consent-secondary: #f3f4f6;
    --consent-secondary-text: #4b5563;
    --consent-secondary-hover: #e5e7eb;
    --consent-z-index: 9999;
}

.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--consent-bg);
    border-top: 1px solid var(--consent-border);
    padding: 1.5rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: var(--consent-z-index);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    display: none;
    /* Hidden by default, shown by JS */
}

.consent-banner.show {
    transform: translateY(0);
    display: block;
}

.consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .consent-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.consent-text h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--consent-text);
    margin: 0 0 0.5rem 0;
}

.consent-text p {
    font-size: 0.875rem;
    color: var(--consent-secondary-text);
    margin: 0;
    line-height: 1.5;
}

.consent-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 300px;
}

@media (min-width: 640px) {
    .consent-actions {
        flex-direction: row;
        align-items: center;
    }
}

.consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-accept {
    background-color: var(--consent-primary);
    color: white;
}

.btn-accept:hover {
    background-color: var(--consent-primary-hover);
}

.btn-reject {
    background-color: var(--consent-secondary);
    color: var(--consent-secondary-text);
}

.btn-reject:hover {
    background-color: var(--consent-secondary-hover);
}

.btn-manage {
    background-color: transparent;
    border-color: var(--consent-border);
    color: var(--consent-secondary-text);
}

.btn-manage:hover {
    border-color: var(--consent-secondary-text);
    color: var(--consent-text);
}

/* Modal Styles */
.consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--consent-z-index) + 1);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.consent-modal.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--consent-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--consent-secondary-text);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--consent-border);
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.preference-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--consent-secondary-text);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--consent-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #f9fafb;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--consent-primary);
}

input:disabled+.slider {
    opacity: 0.5;
    cursor: not-allowed;
}

input:checked+.slider:before {
    transform: translateX(20px);
}