/* Cookie Consent Base */
:root {
    --ag-primary-color: #2563eb;
}
#ag-cookie-consent-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ag-cookie-banner,
.ag-cookie-modal {
    position: fixed;
    z-index: 999999;
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.ag-cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.ag-cookie-banner.ag-hidden {
    display: none !important;
}

.ag-cookie-banner-text {
    flex: 1 1 300px;
}

.ag-cookie-banner-text h2 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: #111827;
}

.ag-cookie-banner-text p {
    margin: 0;
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.5;
}

.ag-cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* WCAG Compliant Buttons */
.ag-btn {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f3f4f6;
    color: #374151;
}

.ag-btn:focus-visible {
    outline: 2px solid var(--ag-primary-color);
    outline-offset: 2px;
}

.ag-btn-primary {
    background: var(--ag-primary-color);
    color: #ffffff;
}

.ag-btn-primary:hover,
.ag-btn-primary:focus {
    opacity: 0.9;
}

.ag-btn-outline {
    background: transparent;
    border-color: #d1d5db;
}

.ag-btn-outline:hover,
.ag-btn-outline:focus {
    background: #f3f4f6;
}

/* Modal Overlay */
.ag-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    display: none;
}

.ag-modal-overlay.ag-active {
    display: block;
}

/* Settings Modal */
.ag-cookie-modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 8px;
    display: none;
    flex-direction: column;
}

.ag-cookie-modal.ag-active {
    display: flex;
}

.ag-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ag-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.ag-modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    color: #6b7280;
}

.ag-modal-close:focus-visible {
    outline: 2px solid var(--ag-primary-color);
    outline-offset: 2px;
}

.ag-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.ag-cookie-category {
    margin-bottom: 24px;
}

.ag-cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ag-cookie-category-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.ag-cookie-category p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
}

/* Accessible Toggle Switch */
.ag-toggle {
    position: relative;
    display: inline-block;
}

.ag-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ag-toggle-label {
    display: block;
    width: 48px;
    height: 24px;
    background-color: #d1d5db;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.ag-toggle-label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.ag-toggle input:checked + .ag-toggle-label {
    background-color: var(--ag-primary-color);
}

.ag-toggle input:checked + .ag-toggle-label::after {
    transform: translateX(24px);
}

.ag-toggle input:focus-visible + .ag-toggle-label {
    outline: 2px solid var(--ag-primary-color);
    outline-offset: 2px;
}

.ag-toggle input:disabled + .ag-toggle-label {
    opacity: 0.6;
    cursor: not-allowed;
}

.ag-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
