/**
 * Google Policy Compliance Styles
 * Enhanced accessibility, GDPR compliance, and Google policy adherence
 * Greek Squad LLC - 2025
 */

/* ==========================================================================
   ACCESSIBILITY ENHANCEMENTS (WCAG 2.1 AA Compliance)
   ========================================================================== */

/* Skip to content link */
.skip-to-content {
    position: absolute !important;
    top: -40px !important;
    left: 6px !important;
    z-index: 999999 !important;
    background: #000 !important;
    color: #fff !important;
    padding: 8px 16px !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: top 0.2s ease !important;
}

.skip-to-content:focus {
    top: 6px !important;
    outline: 2px solid #0d6efd !important;
    outline-offset: 2px !important;
}

/* Enhanced focus indicators */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
    outline: 2px solid #0d6efd !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25) !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #000 !important;
        border-color: #000 !important;
        color: #fff !important;
    }
    
    .btn-outline-primary {
        border-color: #000 !important;
        color: #000 !important;
    }
    
    .text-muted {
        color: #333 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Screen reader only content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: inherit !important;
}

/* ==========================================================================
   COOKIE CONSENT MODAL STYLES
   ========================================================================== */

#cookie-consent-modal {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}

#cookie-consent-modal .modal-content {
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 650px;
    margin: 20px auto;
}

/* Cookie category cards */
.cookie-categories .border {
    transition: all 0.2s ease;
    border: 2px solid #e5e7eb !important;
}

.cookie-categories .border:hover {
    border-color: #0d6efd !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Enhanced form switches */
.form-check-input {
    width: 2.5em;
    height: 1.25em;
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.form-check-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cookie consent buttons */
#cookie-consent-modal .btn {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

#cookie-consent-modal .btn-primary {
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    border: none;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

#cookie-consent-modal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.4);
}

#cookie-consent-modal .btn-success {
    background: linear-gradient(135deg, #198754, #146c43);
    border: none;
    box-shadow: 0 2px 4px rgba(25, 135, 84, 0.3);
}

#cookie-consent-modal .btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

#cookie-consent-modal .btn-outline-secondary:hover {
    background: #6c757d;
    color: #fff;
}

/* ==========================================================================
   THIRD-PARTY SERVICE BANNER & NOTICES
   ========================================================================== */

/* Third-party service banner at top of pages */
.third-party-banner {
    background: linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4) !important;
    border-bottom: 3px solid #1d4ed8;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
    position: relative;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
}

.third-party-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.third-party-banner p {
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    line-height: 1.4;
    margin-bottom: 0;
}

.third-party-banner .bi {
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

/* Third-party service notice in forms */
.third-party-service-notice {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 2px solid #3b82f6 !important;
    border-radius: 8px;
    position: relative;
    margin: 16px 0;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.third-party-service-notice::before {
    content: '🏢';
    position: absolute;
    top: -8px;
    left: 16px;
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.third-party-service-notice p {
    margin-bottom: 8px !important;
    font-size: 13px;
    line-height: 1.5;
    color: #1e40af !important;
    font-weight: 500;
}

/* Enhanced disclaimer styling */
.service-disclaimer {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b !important;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    box-shadow: 0 3px 6px rgba(245, 158, 11, 0.2);
    position: relative;
}

.service-disclaimer::before {
    content: '⚠️';
    position: absolute;
    top: -8px;
    left: 16px;
    background: #f59e0b;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.service-disclaimer h5 {
    color: #92400e !important;
    margin-bottom: 12px;
    font-weight: 700;
}

.service-disclaimer p {
    color: #78350f !important;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.service-disclaimer .btn {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.service-disclaimer .btn:hover {
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   DATA PROCESSING NOTICES
   ========================================================================== */

.data-processing-notice {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px;
    margin: 12px 0;
    position: relative;
}

.data-processing-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #0d6efd, #198754);
    border-radius: 4px 0 0 4px;
}

.data-processing-notice p {
    margin-bottom: 8px !important;
    font-size: 13px;
    line-height: 1.4;
}

.data-processing-notice a {
    color: #0d6efd;
    text-decoration: underline;
    font-weight: 500;
}

.data-processing-notice a:hover {
    color: #0056b3;
    text-decoration: none;
}

/* ==========================================================================
   ADVERTISING DISCLOSURE ENHANCEMENTS
   ========================================================================== */

.ads-disclosure-compact {
    background: linear-gradient(135deg, #212529, #343a40);
    color: #f8f9fa;
    font-size: 12px;
    line-height: 1.4;
    padding: 12px 0;
    border-top: 1px solid #495057;
}

.ads-disclosure-compact a {
    color: #86cfda;
    text-decoration: underline;
    font-weight: 500;
}

.ads-disclosure-compact a:hover {
    color: #5bc2d7;
    text-decoration: none;
}

/* Ad consent notice for disabled ads */
.ad-consent-notice {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 2px dashed #dee2e6 !important;
    text-align: center;
    padding: 20px;
    margin: 16px 0;
}

.ad-consent-notice a {
    color: #0d6efd;
    text-decoration: underline;
    font-weight: 600;
}

/* ==========================================================================
   PRIVACY POLICY ENHANCEMENTS
   ========================================================================== */

.privacy-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e9ecef;
}

.privacy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.privacy-highlight {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    position: relative;
}

.privacy-highlight::before {
    content: '⚠️';
    font-size: 18px;
    margin-right: 8px;
}

/* Contact information cards */
.contact-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    transition: all 0.2s ease;
}

.contact-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

/* ==========================================================================
   NOTIFICATION ANIMATIONS
   ========================================================================== */

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.consent-notification {
    animation: slideInFromRight 0.3s ease-out;
}

.policy-modal-content {
    animation: fadeInUp 0.3s ease-out;
}

/* Floating third-party notice */
.floating-third-party-notice {
    bottom: 20px;
    right: 20px;
    max-width: 350px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(30, 41, 59, 0.4);
    z-index: 999998;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-third-party-notice.show {
    transform: translateX(0);
    opacity: 1;
}

.floating-third-party-notice h6 {
    color: #60a5fa;
    font-weight: 600;
    font-size: 15px;
}

.floating-third-party-notice p {
    color: #cbd5e1;
    line-height: 1.4;
    margin-bottom: 12px;
}

.floating-third-party-notice .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 600;
}

.floating-third-party-notice .btn-close-white {
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.floating-third-party-notice .btn-close-white:hover {
    opacity: 1;
}

/* Phone call notice */
.phone-call-notice {
    animation: fadeInScale 0.3s ease-out;
    border: 2px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Enhanced cookie modal with third-party emphasis */
#cookie-consent-modal .modal-content {
    border: 3px solid #3b82f6;
    position: relative;
}

#cookie-consent-modal .modal-content::before {
    content: '🏢 Independent Service Provider';
    position: absolute;
    top: -12px;
    left: 20px;
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Third-party service badges */
.third-party-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    display: inline-block;
    margin: 4px 8px 4px 0;
}

.third-party-badge i {
    margin-right: 4px;
    font-size: 10px;
}

/* ==========================================================================
   RESPONSIVE DESIGN ENHANCEMENTS
   ========================================================================== */

@media (max-width: 768px) {
    #cookie-consent-modal .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .cookie-categories .border {
        margin-bottom: 16px;
    }
    
    #cookie-consent-modal .d-flex {
        flex-direction: column;
        gap: 8px;
    }
    
    #cookie-consent-modal .btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .data-processing-notice {
        padding: 12px;
        margin: 8px 0;
    }
    
    /* Mobile styles for third-party elements */
    .third-party-banner {
        font-size: 12px;
        padding: 8px 0;
    }
    
    .third-party-banner .col-md-8,
    .third-party-banner .col-md-4 {
        text-align: center;
        margin-bottom: 4px;
    }
    
    .service-disclaimer {
        padding: 12px;
        margin: 12px 0;
    }
    
    .service-disclaimer .d-flex {
        flex-direction: column;
        gap: 8px;
    }
    
    .service-disclaimer .btn {
        width: 100%;
        padding: 10px 16px;
    }
    
    .floating-third-party-notice {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 16px;
    }
    
    .floating-third-party-notice .d-flex {
        flex-direction: column;
        gap: 8px;
    }
    
    .floating-third-party-notice .btn {
        width: 100%;
        margin-bottom: 4px;
    }
}

@media (max-width: 480px) {
    .ads-disclosure-compact {
        padding: 8px 0;
        font-size: 11px;
    }
    
    .privacy-highlight {
        padding: 12px;
        margin: 12px 0;
    }
    
    .contact-card {
        padding: 16px;
        margin: 12px 0;
    }
}

/* ==========================================================================
   PRINT STYLES FOR PRIVACY DOCUMENTS
   ========================================================================== */

@media print {
    .skip-to-content,
    #cookie-consent-modal,
    .ads-disclosure-compact,
    .ad-consent-notice {
        display: none !important;
    }
    
    .privacy-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .privacy-highlight {
        border: 2px solid #000 !important;
        background: #f0f0f0 !important;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10px;
        color: #666;
    }
}

/* ==========================================================================
   ENHANCED THIRD-PARTY SERVICE STYLING
   ========================================================================== */

/* Main third-party service banner */
.third-party-main-banner {
    background: linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4, #10b981) !important;
    border-bottom: 4px solid #1d4ed8;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    position: relative;
    overflow: hidden;
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4, #10b981) !important; }
    50% { background: linear-gradient(135deg, #10b981, #06b6d4, #3b82f6, #1e40af) !important; }
}

.third-party-main-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: shimmer 4s infinite;
}

/* Brand specific disclaimer */
.brand-specific-disclaimer {
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff) !important;
    border: 2px solid #0ea5e9 !important;
    border-radius: 10px;
    position: relative;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.brand-specific-disclaimer::before {
    content: '🏢';
    position: absolute;
    top: -10px;
    left: 20px;
    background: #0ea5e9;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 16px;
    box-shadow: 0 3px 8px rgba(14, 165, 233, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.brand-specific-disclaimer .alert-heading {
    color: #0c4a6e !important;
    font-weight: 700;
    margin-bottom: 12px;
}

.brand-specific-disclaimer p {
    color: #0f172a !important;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Brand independence indicators */
.brand-independence-indicator {
    display: inline-block;
    vertical-align: super;
    margin-left: 2px;
}

.brand-independence-indicator .third-party-badge {
    font-size: 8px !important;
    padding: 2px 6px !important;
    line-height: 1.2;
    vertical-align: baseline;
    cursor: help;
    transition: all 0.2s ease;
}

.brand-independence-indicator .third-party-badge:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: scale(1.1);
}

/* Third-party context cards */
.third-party-context {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 6px;
    margin-top: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.third-party-context::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #3b82f6, #06b6d4);
    border-radius: 4px 0 0 4px;
}

.third-party-context:hover {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Service type indicators */
.service-type-indicator {
    color: #64748b !important;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-type-indicator i {
    color: #3b82f6;
}

/* Enhanced contact cards with third-party emphasis */
.contact-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin: 16px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '🏢';
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 6px;
    border-radius: 50%;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.contact-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    transform: translateY(-3px);
}

.contact-card:hover::before {
    animation-play-state: paused;
    transform: scale(1.1);
}

/* ==========================================================================
   DARK MODE SUPPORT (FUTURE-PROOFING)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .data-processing-notice {
        background: linear-gradient(135deg, #2d3748, #1a202c);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .privacy-highlight {
        background: linear-gradient(135deg, #2d3748, #1a202c);
        border-color: #ffc107;
        color: #e2e8f0;
    }
    
    .contact-card {
        background: linear-gradient(135deg, #2d3748, #1a202c);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    #cookie-consent-modal .bg-white {
        background: #1a202c !important;
        color: #e2e8f0 !important;
    }
    
    #cookie-consent-modal .border {
        border-color: #4a5568 !important;
    }
}
