/* ========== GDPR/CCPA COMPLIANT FCM CONSENT STYLES ========== */
/* 
 * PURPOSE: Professional styling for FCM consent UI elements
 * DATE: September 29, 2025
 * COMPLIANCE: Accessible, mobile-responsive, professional design
 * FEATURES: Banner, modal, preferences, status messages
 */

/* ========== CONSENT BANNER STYLES ========== */
.fcm-consent-banner {
    position: fixed;
    bottom: 68px;
    left: 0;
    right: 0;
    z-index: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideInUp 0.3s ease-out;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
    min-width: 250px;
}

.banner-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffffff;
}

.banner-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-banner-customize,
.btn-banner-enable,
.btn-banner-dismiss {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-banner-customize {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-banner-customize:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-banner-enable {
    background: #10b981;
    color: white;
    font-weight: 600;
}

.btn-banner-enable:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-banner-allow-all {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    padding: 10px 16px;
    border-radius: 6px;
}

.btn-banner-allow-all:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-banner-dismiss {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
}

.btn-banner-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.banner-privacy {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.banner-privacy a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.banner-privacy a:hover {
    color: white;
}

/* ========== CONSENT MODAL STYLES ========== */
.fcm-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideInScale 0.3s ease-out;
    margin: 20px auto 0px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-icon {
    font-size: 28px;
}

.modal-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 0 24px;
    color: #374151;
}

/* ========== CONSENT INTRO SECTION ========== */
.consent-intro {
    margin-bottom: 32px;
}

.intro-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.intro-text {
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 24px;
}

.data-usage-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.usage-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.usage-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.usage-content strong {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.usage-content small {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

/* ========== CONSENT PREFERENCES SECTION ========== */
.consent-preferences {
    margin-bottom: 32px;
}

.consent-preferences h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.preferences-intro {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.preference-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preference-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.preference-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.preference-item.required {
    border-color: #f59e0b;
    background: #fffbeb;
}

.preference-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    width: 100%;
}

.preference-item.required .preference-label {
    cursor: not-allowed;
}

/* Custom Checkbox Styles */
.preference-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkmark:after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.preference-label input[type="checkbox"]:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.preference-label input[type="checkbox"]:checked + .checkmark:after {
    opacity: 1;
}

.required-checkmark {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
}

.required-checkmark:after {
    opacity: 1 !important;
}

.preference-content {
    flex: 1;
}

.preference-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.preference-icon {
    font-size: 18px;
}

.preference-title strong {
    font-weight: 600;
    color: #1f2937;
}

.required-badge {
    background: #f59e0b;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.preference-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

/* ========== LEGAL SECTION ========== */
.consent-legal {
    margin-bottom: 24px;
}

.legal-notice h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.rights-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.rights-list li {
    padding: 8px 0;
    font-size: 14px;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}

.rights-list li:last-child {
    border-bottom: none;
}

.rights-list li strong {
    color: #1f2937;
}

.legal-links {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.legal-links a {
    color: #3b82f6;
    text-decoration: none;
}

.legal-links a:hover {
    text-decoration: underline;
}

/* ========== MODAL FOOTER ========== */
.modal-footer {
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.footer-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.btn-consent-deny,
.btn-consent-minimal,
.btn-consent-allow-all,
.btn-consent-accept {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn-consent-deny {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-consent-deny:hover {
    background: #e5e7eb;
    color: #374151;
}

.btn-consent-minimal {
    background: #fbbf24;
    color: white;
}

.btn-consent-minimal:hover {
    background: #f59e0b;
    transform: translateY(-1px);
}

.btn-consent-allow-all {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: 1px solid #059669;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-consent-allow-all:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-consent-accept {
    background: #6366f1;
    color: white;
}

.btn-consent-accept:hover {
    background: #059669;
    transform: translateY(-1px);
}

.footer-metadata {
    text-align: center;
}

.consent-metadata {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.withdraw-link {
    color: #ef4444;
    text-decoration: none;
}

.withdraw-link:hover {
    text-decoration: underline;
}

/* ========== CONSENT STATUS MESSAGES ========== */
.consent-status-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    max-width: 400px;
}

.status-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-out;
    margin-bottom: 8px;
}

.success-message {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

.info-message {
    background: #eff6ff;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

.warning-message {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.message-content {
    flex: 1;
}

.message-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.message-text strong {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.message-text small {
    font-size: 13px;
    opacity: 0.8;
}

.message-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 4px;
    border-radius: 2px;
}

.message-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .banner-actions {
        width: 100%;
        justify-content: center;
    }
    
    .modal-container {
        width: 95%;
        margin: 20px;
        max-height: 85vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .usage-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-actions {
        flex-direction: column;
    }
    
    .btn-consent-deny,
    .btn-consent-minimal,
    .btn-consent-accept {
        width: 100%;
    }
    
    .consent-status-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .banner-container {
        padding: 12px 16px;
    }
    
    .banner-title {
        font-size: 16px;
    }
    
    .banner-description {
        font-size: 13px;
    }
    
    .modal-title h2 {
        font-size: 20px;
    }
    
    .preference-label {
        padding: 12px;
    }
    
    .btn-banner-customize,
    .btn-banner-enable,
    .btn-banner-dismiss {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInScale {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .fcm-consent-banner,
    .fcm-consent-modal,
    .modal-container,
    .status-message {
        animation: none;
    }
    
    .btn-banner-customize:hover,
    .btn-banner-enable:hover,
    .btn-consent-minimal:hover,
    .btn-consent-accept:hover {
        transform: none;
    }
}

/* Focus styles for keyboard navigation */
.btn-banner-customize:focus,
.btn-banner-enable:focus,
.btn-banner-dismiss:focus,
.btn-consent-deny:focus,
.btn-consent-minimal:focus,
.btn-consent-accept:focus,
.modal-close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.preference-label:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 8px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .fcm-consent-banner {
        background: #000;
        border-top: 2px solid #fff;
    }
    
    .modal-container {
        border: 2px solid #000;
    }
    
    .preference-item {
        border: 2px solid #000;
    }
    
    .checkmark {
        border: 2px solid #000;
    }
}

/* ========== MOBILE RESPONSIVE STYLES ========== */

/* Mobile First - Base styles for mobile devices */
@media screen and (max-width: 768px) {
    /* Mobile Banner Adjustments */
    .fcm-consent-banner {
        position: fixed;
        bottom: 66px;
        left: 0;
        right: 0;
        top: auto;
        padding: 0;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        max-width: none;
        width: 100%;
        z-index: 9999;
    }

    .banner-container {
        flex-direction: column;
        gap: 16px;
        padding: 20px 16px;
        border-radius: 16px 16px 0 0;
    }

    .banner-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .banner-icon {
        font-size: 32px;
        margin-bottom: 8px;
        display: block;
    }

    .banner-title {
        font-size: 18px;
        font-weight: 700;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .banner-description {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 16px;
        color: rgba(255, 255, 255, 0.9);
    }

    .banner-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .banner-actions button {
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
        min-height: 48px; /* Touch-friendly minimum */
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .btn-banner-allow-all {
        order: 1; /* Show first on mobile */
        background: linear-gradient(135deg, #10b981, #059669);
        color: white;
        font-size: 18px;
        font-weight: 700;
        padding: 18px 24px;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    }

    .btn-banner-allow-all:hover, .btn-banner-allow-all:active {
        background: linear-gradient(135deg, #059669, #047857);
        transform: translateY(-1px);
    }

    .btn-banner-customize {
        order: 2;
        background: rgba(255, 255, 255, 0.9);
        color: #1f2937;
        border: 2px solid rgba(16, 185, 129, 0.3);
        font-weight: 600;
    }

    .btn-banner-customize:hover, .btn-banner-customize:active {
        background: rgba(255, 255, 255, 1);
        color: #059669;
    }

    .btn-banner-dismiss {
        order: 3;
        padding: 12px;
        font-size: 18px;
        background: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.8);
        width: auto;
        align-self: center;
        border-radius: 50%;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .banner-privacy {
        font-size: 11px;
        line-height: 1.3;
        text-align: center;
        margin-top: 12px;
        color: rgba(255, 255, 255, 0.7);
    }

    .banner-privacy a {
        color: rgba(255, 255, 255, 0.9);
    }

    /* Mobile Modal Adjustments */
    .fcm-consent-modal {
        padding: 16px;
        align-items: flex-end; /* Align to bottom on mobile */
    }

    .modal-container {
        max-width: none;
        width: 100%;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
        margin: 0;
    }

    .modal-header {
        padding: 20px 20px 16px 20px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
        border-radius: 16px 16px 0 0;
    }

    .modal-title h2 {
        font-size: 20px;
    }

    .modal-close {
        font-size: 28px;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
    }

    .modal-body {
        padding: 16px 20px;
    }

    .modal-intro {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .preferences-grid {
        gap: 16px;
    }

    .preference-item {
        padding: 16px;
        border-radius: 8px;
    }

    .preference-label {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .preference-content {
        gap: 12px;
    }

    .preference-title {
        font-size: 16px;
        gap: 10px;
    }

    .preference-icon {
        font-size: 20px;
        min-width: 24px;
    }

    .preference-description {
        font-size: 13px;
        line-height: 1.4;
    }

    .checkmark {
        width: 22px;
        height: 22px;
        min-width: 22px;
        min-height: 22px;
    }

    .checkmark:after {
        width: 6px;
        height: 10px;
        left: 7px;
        top: 3px;
    }

    .modal-footer {
        padding: 20px;
        position: sticky;
        bottom: 0;
        background: white;
        border-radius: 0;
    }

    .footer-actions {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 16px;
    }

    .footer-actions button {
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
        min-height: 48px;
        border-radius: 8px;
    }

    .btn-consent-allow-all {
        order: 1;
        font-size: 18px;
        padding: 18px 24px;
    }

    .btn-consent-minimal {
        order: 2;
    }

    .btn-consent-accept {
        order: 3;
    }

    .btn-consent-deny {
        order: 4;
        margin-top: 8px;
    }

    .footer-metadata {
        font-size: 11px;
        line-height: 1.4;
    }
}

/* Extra Small Mobile Devices (iPhone SE, small Android) */
@media screen and (max-width: 375px) {
    .banner-title {
        font-size: 16px;
    }

    .banner-description {
        font-size: 13px;
    }

    .banner-actions button {
        padding: 14px 16px;
        font-size: 15px;
        min-height: 44px;
    }

    .btn-banner-allow-all {
        font-size: 16px;
        padding: 16px 20px;
    }

    .modal-container {
        max-height: 90vh;
    }

    .modal-header {
        padding: 16px 16px 12px 16px;
    }

    .modal-title h2 {
        font-size: 18px;
    }

    .modal-body {
        padding: 12px 16px;
    }

    .preference-item {
        padding: 14px;
    }

    .modal-footer {
        padding: 16px;
    }

    .footer-actions button {
        padding: 14px 16px;
        font-size: 15px;
        min-height: 44px;
    }

    .btn-consent-allow-all {
        font-size: 16px;
        padding: 16px 20px;
    }
}

/* Large Mobile Devices (iPhone Plus, large Android) */
@media screen and (min-width: 414px) and (max-width: 768px) {
    .banner-title {
        font-size: 19px;
    }

    .banner-description {
        font-size: 15px;
    }

    .btn-banner-allow-all {
        font-size: 19px;
        padding: 20px 28px;
    }

    .modal-container {
        max-height: 80vh;
    }
}

/* Tablet Portrait */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .fcm-consent-banner {
        bottom: 20px;
        left: 20px;
        right: 20px;
        border-radius: 12px;
        max-width: 600px;
        margin: 0 auto;
        position: fixed;
    }

    .banner-container {
        flex-direction: row;
        padding: 20px;
    }

    .banner-content {
        flex-direction: row;
        text-align: left;
    }

    .banner-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    .banner-actions button {
        flex: 1;
        min-width: 120px;
        max-width: 160px;
        padding: 12px 16px;
    }

    .modal-container {
        max-width: 500px;
        max-height: 85vh;
    }
}

/* Landscape Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .fcm-consent-banner {
        position: fixed;
        top: 0;
        bottom: auto;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .banner-container {
        padding: 12px 16px;
    }

    .banner-title {
        font-size: 16px;
    }

    .banner-description {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .banner-actions {
        flex-direction: row;
        gap: 8px;
    }

    .banner-actions button {
        flex: 1;
        padding: 10px 12px;
        font-size: 14px;
        min-height: 40px;
    }

    .btn-banner-allow-all {
        font-size: 15px;
        padding: 12px 16px;
    }

    .modal-container {
        max-height: 95vh;
        width: 95%;
        max-width: 600px;
    }

    .modal-header, .modal-footer {
        padding: 12px 20px;
    }

    .modal-body {
        padding: 12px 20px;
    }
}

/* High DPI / Retina Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    .banner-actions button,
    .footer-actions button {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ========== MOBILE-SPECIFIC DEVICE OPTIMIZATIONS ========== */

/* iOS Safe Area Support */
.ios-device .fcm-consent-banner {
    padding-bottom: env(safe-area-inset-bottom);
}

.ios-device .modal-footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

/* Android Keyboard Handling */
.android-device.keyboard-visible .fcm-consent-modal {
    align-items: flex-start;
    padding-top: 20px;
}

.android-device.keyboard-visible .modal-container {
    max-height: 60vh;
}

/* Touch-Friendly Enhancements */
.mobile-device .banner-actions button,
.mobile-device .footer-actions button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.mobile-device .banner-actions button:active,
.mobile-device .footer-actions button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Mobile Scroll Enhancements */
.mobile-device .modal-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* iOS Specific Fixes */
.ios-device .modal-container {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Android Specific Fixes */
.android-device .fcm-consent-banner {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.android-device .modal-container {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Accessibility Enhancements for Mobile */
@media (prefers-reduced-motion: reduce) {
    .mobile-device .banner-actions button,
    .mobile-device .footer-actions button {
        transition: none;
    }
    
    .mobile-device .banner-actions button:active,
    .mobile-device .footer-actions button:active {
        transform: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .mobile-device .fcm-consent-banner {
        border: 2px solid #000;
    }
    
    .mobile-device .btn-banner-allow-all,
    .mobile-device .btn-consent-allow-all {
        border: 2px solid #fff;
    }
}

/* Dark Mode Support for Mobile */
@media (prefers-color-scheme: dark) {
    .mobile-device .modal-container {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .mobile-device .modal-header {
        border-bottom-color: #374151;
        background: #1f2937;
    }
    
    .mobile-device .modal-footer {
        border-top-color: #374151;
        background: #111827;
    }
    
    .mobile-device .preference-item {
        background: #374151;
        border-color: #4b5563;
    }
}

/* PWA/Standalone App Support */
@media (display-mode: standalone) {
    .mobile-device .fcm-consent-banner {
        bottom: env(safe-area-inset-bottom);
    }
    
    .mobile-device .modal-footer {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}
