/**
 * AI Personalization Engine - Frontend Styles
 * Styles for personalization elements, banners, popups, and lead capture forms
 */

 /* Overlay */
.popup-overlay {
    position: fixed;
    inset: 0;
    display: none; /* controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 9999;
  }

/* Popup CTA Container Alignment */
.popup-cta-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.popup-cta-container.align-left {
    justify-content: flex-start;
}

.popup-cta-container.align-center {
    justify-content: center;
}

.popup-cta-container.align-right {
    justify-content: flex-end;
}

/* Toast Icon Styles */
.ai-content-toast-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    margin-left: 12px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.ai-icon-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3) !important;
}

.ai-icon-success::after {
    content: "✓" !important;
    font-size: 18px !important;
    line-height: 1 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.ai-icon-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3) !important;
}

.ai-icon-warning::after {
    content: "⚠" !important;
    font-size: 16px !important;
    line-height: 1 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.ai-icon-error {
    background: linear-gradient(135deg, #dc3545, #e83e8c) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
}

.ai-icon-error::after {
    content: "✕" !important;
    font-size: 18px !important;
    line-height: 1 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.ai-icon-info {
    background: linear-gradient(135deg, #17a2b8, #6f42c1) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3) !important;
}

.ai-icon-info::after {
    content: "ℹ" !important;
    font-size: 16px !important;
    line-height: 1 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* Toast CTA Button Styles */
.ai-toast-cta {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  
    padding: 10px !important;
    text-decoration: none !important;
    border-radius: 20px !important;
   
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: 0.3px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
    
}

.ai-toast-cta::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    transition: left 0.5s !important;
}

.ai-toast-cta:hover {
    background: linear-gradient(135deg, #0056b3, #004085) !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4) !important;
}

.ai-toast-cta:hover::before {
    left: 100% !important;
}

.ai-toast-cta:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3) !important;
}

.ai-toast-cta:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25) !important;
}
  
  /* Popup Box (normal layout) */
  .popup-box {
    position: relative;
    max-width: 80%;
    display: flex;
    flex-direction: column;
    max-height: 75%;
    overflow: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 20px;
  }

  .popup-box::-webkit-scrollbar {
    width: 8px;
    background: #f0f0f0;
  }
  .popup-box::-webkit-scrollbar-thumb {
    background: #b3b3b3;
    border-radius: 6px;
  }
  .popup-box::-webkit-scrollbar-thumb:hover {
    background: #888;
    /* Optional: darker on hover */
    }
  
  /* Content Section */
  .popup-content {
    padding: 20px;
    text-align: center;
  }
  
  /* Image Section */
  .popup-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    margin-bottom: 20px;
  }

/* Popup Visibility */
.popup-overlay.popup-visible {
  display: flex;
}

/* Popup Heading */
.popup-heading {
  margin: 0 0 20px 0;
  font-size: 22px;
  font-weight: 600;
  color: #222222;
}

/* Popup Text */
.popup-text {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.6;
  color: #555555;
}

/* Popup CTA Button */
.popup-cta {
  display: inline-block;
  padding: 12px 24px;
  background-color: #007bff;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.popup-cta:hover {
  background-color: #0056b3;
  color: #ffffff;
}


/* Top Banner Styles */
.ai-top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease-out;
}

/* Content Manager Banner Styles */

.ai-content-banner-top {
    top: 0;
}

.ai-content-banner-bottom {
    bottom: 0;
}

.ai-content-banner-content {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.ai-content-banner-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.ai-content-banner-close:hover {
    opacity: 1;
}

/* Original Banner Content Styles */
.ai-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.ai-banner-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    min-width: 200px;
}

.ai-banner-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    flex: 1;
    min-width: 200px;
}

.ai-banner-cta {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ai-banner-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.ai-banner-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.ai-banner-close:hover {
    opacity: 1;
}

/* Offer Banner Styles */
.ai-offer-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 20px;
    max-width: 300px;
    z-index: 9997;
    animation: slideInRight 0.5s ease-out;
}

.ai-offer-content h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ai-offer-content p {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.ai-offer-cta {
    text-align: center;
}

.ai-offer-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-bottom: 10px;
    width: 100%;
}

.ai-offer-btn:hover {
    transform: translateY(-2px);
}

.ai-offer-text {
    display: block;
    font-size: 12px;
    color: #28a745;
    font-weight: 600;
}

/* Info Banner Styles */
.ai-info-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 15px 20px;
    max-width: 280px;
    z-index: 9997;
    animation: slideInLeft 0.5s ease-out;
}

.ai-info-content h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.ai-info-content p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.ai-info-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.ai-info-link:hover {
    color: #764ba2;
    text-decoration: none;
}

/* Emergency Popup Styles */
.ai-emergency-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(220, 53, 69, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.ai-emergency-content {
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}



.ai-emergency-phone {
    margin-bottom: 25px;
}

.ai-phone-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #dc3545;
    margin-bottom: 15px;
}

.ai-call-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ai-call-btn:hover {
    background: #c82333;
}

.ai-emergency-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lead Capture Modal Styles */
.ai-lead-capture-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-lead-capture-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.ai-lead-capture-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.ai-lead-capture-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.ai-lead-capture-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.ai-lead-capture-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-lead-capture-body {
    padding: 30px;
}

.ai-lead-form .form-group {
    margin-bottom: 20px;
}

.ai-lead-form input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.ai-lead-form input:focus {
    outline: none;
    border-color: #667eea;
}

.ai-lead-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ai-lead-submit-btn:hover {
    transform: translateY(-2px);
}

.ai-lead-offer {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

.ai-lead-capture-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    text-align: center;
}

.ai-privacy-note {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
}

.ai-phone-cta {
    text-align: center;
    padding: 20px 0;
}

.ai-phone-number {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
    margin: 0 0 10px 0;
}

.ai-phone-subtitle {
    color: #6c757d;
    margin: 0 0 20px 0;
}

.ai-call-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ai-call-btn:hover {
    background: #218838;
}

/* Message Styles */
.ai-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    max-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

.ai-message-success {
    background: #28a745;
}

.ai-message-error {
    background: #dc3545;
}

/* Animation Keyframes */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-top-banner {
        padding: 12px 15px;
    }
    
    .ai-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .ai-banner-content h3,
    .ai-banner-content p {
        min-width: auto;
        text-align: center;
    }
    
    .ai-offer-banner,
    .ai-info-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .ai-lead-capture-content {
        width: 95%;
        margin: 20px;
    }
    
    .ai-lead-capture-header {
        padding: 20px;
    }
    
    .ai-lead-capture-body {
        padding: 20px;
    }
    
    .ai-emergency-content {
        margin: 15px;
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .ai-top-banner {
        padding: 10px;
    }
    
    .ai-banner-content h3 {
        font-size: 16px;
    }
    
    .ai-banner-content p {
        font-size: 13px;
    }
    
    .ai-banner-cta {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .ai-lead-capture-header h3 {
        font-size: 20px;
    }
    
    .ai-lead-capture-header p {
        font-size: 14px;
    }
    
    .ai-lead-form input {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .ai-top-banner,
    .ai-offer-banner,
    .ai-info-banner {
        border: 2px solid #000;
    }
    
    .ai-lead-capture-content {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ai-top-banner,
    .ai-offer-banner,
    .ai-info-banner,
    .ai-emergency-popup,
    .ai-lead-capture-modal,
    .ai-message {
        animation: none;
    }
    
    .ai-banner-cta:hover,
    .ai-offer-btn:hover,
    .ai-lead-submit-btn:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .ai-top-banner,
    .ai-offer-banner,
    .ai-info-banner,
    .ai-emergency-popup,
    .ai-lead-capture-modal {
        display: none !important;
    }
}

/* Content Manager Popup Styles */
.ai-content-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-content-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-out;
}

.ai-content-popup-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
}

.ai-content-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #666;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-content-popup-close:hover {
    color: #333;
}

.ai-content-popup-body {
    margin-top: 20px;
}

.ai-content-popup-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.ai-content-popup-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
}


.ai-content-sticky-bar-top {
    top: 0;
}

.ai-content-sticky-bar-bottom {
    bottom: 0;
}

.ai-content-sticky-bar-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
}

.ai-content-sticky-bar-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.ai-content-sticky-bar-close:hover {
    opacity: 1;
}

/* Content Manager Toast Styles */
.ai-content-toast {
    position: fixed;
    right: 20px;
    top: 20px; /* Default position */
    z-index: 9998;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.5s ease-out;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff; /* Default background */
    color: #333333; /* Default text color */
}

/* Toast Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Additional Positioning Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInTopLeft {
    from {
        transform: translate(-100%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

@keyframes slideInTopRight {
    from {
        transform: translate(100%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

@keyframes slideInBottomLeft {
    from {
        transform: translate(-100%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

@keyframes slideInBottomRight {
    from {
        transform: translate(100%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ai-content-toast-top {
    top: 20px;
}

.ai-content-toast-bottom {
    bottom: 20px;
}

.ai-content-toast-content {
    padding: 15px 20px;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.ai-content-toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.ai-content-toast-close:hover {
    opacity: 1;
}

/* Content Manager Inline Block Styles */
.ai-content-inline-block {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9996;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease-out;
    /* Default styling to ensure visibility */
    background-color: #28a745;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-content-inline-block-top {
    top: 0;
}

.ai-content-inline-block-bottom {
    bottom: 0;
}

.ai-content-inline-block-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
}

.ai-content-inline-block-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.ai-content-inline-block-close:hover {
    opacity: 1;
}

/* Content Manager CTA Button Styles */


/* Content Manager Slide In Styles */
.ai-content-slide-in {
    position: fixed;
    z-index: 9994;
    max-width: 350px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    /* Default styling */
    background-color: #ffffff;
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-content-slide-in-left {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    animation: slideInLeft 0.5s ease-out;
}

.ai-content-slide-in-right {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    animation: slideInRight 0.5s ease-out;
}

.ai-content-slide-in-content {
    padding: 20px;
    position: relative;
}

.ai-content-slide-in-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.ai-content-slide-in-close:hover {
    opacity: 1;
}

/* Content Manager Modal Styles */
.ai-content-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-content-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-out;
}

.ai-content-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease-out;
}

.ai-content-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #666;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-content-modal-close:hover {
    color: #333;
}

.ai-content-modal-body {
    margin-top: 20px;
}

/* Content Manager Full Page Takeover Styles */
.ai-content-full-page-takeover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Default styling */
    background-color: #000000;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-content-full-page-takeover-content {
    position: relative;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    padding: 40px;
}

.ai-content-full-page-takeover-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.ai-content-full-page-takeover-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

/* Emergency Popup Styles */
.ai-emergency-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Background color and opacity are set dynamically via inline styles */
}

.ai-emergency-popup-modal {
    position: relative;
    max-width: 500px;
    margin: 20px;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: emergencyPulse 2s infinite;
    /* Background and text colors are set dynamically via inline styles */
}

.ai-emergency-content {
    margin-bottom: 20px;
    line-height: 1.5;
}

.ai-emergency-content h1,
.ai-emergency-content h2,
.ai-emergency-content h3 {
    margin: 0 0 15px 0;
    font-weight: bold;
}

.ai-emergency-content p {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.ai-emergency-actions {
    margin-top: 20px;
}

.ai-emergency-call-btn {
    display: inline-block;
    padding: 15px 30px;
    margin: 10px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 18px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Background and text colors are set dynamically via inline styles */
}

.ai-emergency-call-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.ai-emergency-call-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ai-emergency-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    padding: 5px;
    transition: opacity 0.3s ease;
    /* Color is set dynamically via inline styles */
}

.ai-emergency-close:hover {
    opacity: 1;
}

/* Emergency popup animations */
@keyframes emergencyPulse {
    0% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    50% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* Urgency level specific animations */
.ai-emergency-popup-modal.urgency-critical {
    animation: emergencyPulseCritical 1s infinite;
}

.ai-emergency-popup-modal.urgency-high {
    animation: emergencyPulse 2s infinite;
}

.ai-emergency-popup-modal.urgency-medium {
    animation: emergencyPulseSlow 3s infinite;
}

.ai-emergency-popup-modal.urgency-low {
    animation: none;
}

@keyframes emergencyPulseCritical {
    0% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(220, 38, 38, 0.9);
        transform: scale(1);
    }
    25% {
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 15px rgba(220, 38, 38, 0);
        transform: scale(1);
    }
    75% {
        transform: scale(0.98);
    }
    100% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(220, 38, 38, 0);
        transform: scale(1);
    }
}

@keyframes emergencyPulseSlow {
    0% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(220, 38, 38, 0.5);
    }
    50% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 8px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* Responsive design for emergency popup */
@media (max-width: 768px) {
    .ai-emergency-popup-modal {
        max-width: 90%;
        margin: 10px;
        padding: 20px;
    }
    
    .ai-emergency-call-btn {
        padding: 12px 24px;
        font-size: 16px;
        margin: 8px;
    }
    
    .ai-emergency-content h1,
    .ai-emergency-content h2 {
        font-size: 20px;
    }
    
    .ai-emergency-content h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .ai-emergency-popup-modal {
        padding: 15px;
    }
    
    .ai-emergency-call-btn {
        width: 100%;
        margin: 5px 0;
        padding: 15px;
    }
    
    .ai-emergency-close {
        top: 5px;
        right: 10px;
        font-size: 20px;
    }
}

/* Content-Type Specific Styling and Animations */

/* Dynamic Content Elements */
.ai-content-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 0.5em;
    color: inherit;
}

.ai-content-description {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 1em;
    color: inherit;
    opacity: 0.9;
}

.ai-content-main {
    margin-bottom: 1em;
}

.ai-content-media {
    text-align: center;
}

.ai-content-media img,
.ai-content-media video {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ai-content-media i {
    display: inline-block;
    margin: 0.5em;
}

.ai-content-cta {
    display: inline-block;
    padding: 12px 24px;
    margin: 1em 0;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1em;
}

/* CTA Button Specific Styles */
.ai-cta-solid {
    background-color: #007cba;
    color: #ffffff;
}

.ai-cta-outline {
    background-color: transparent;
    border: 2px solid #007cba;
    color: #007cba;
}

.ai-cta-ghost {
    background-color: transparent;
    color: #007cba;
}

.ai-cta-square {
    border-radius: 0;
}

.ai-cta-rounded {
    border-radius: 6px;
}

.ai-cta-pill {
    border-radius: 50px;
}

/* CTA Hover Effects */
.ai-cta-hover-color_change:hover {
    background-color: #005a87;
    color: #ffffff;
}

.ai-cta-hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ai-cta-hover-scale:hover {
    transform: scale(1.05);
}

/* CTA Icon Positions */
.ai-cta-icon-left .ai-content-media {
    margin-right: 0.5em;
    display: inline-block;
    vertical-align: middle;
}

.ai-cta-icon-right .ai-content-media {
    margin-left: 0.5em;
    display: inline-block;
    vertical-align: middle;
}

.ai-cta-icon-left,
.ai-cta-icon-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup Animations */
.ai-popup-animation-fade {
    animation: popupFade 0.4s ease-out;
}

.ai-popup-animation-zoom {
    animation: popupZoom 0.4s ease-out;
}

.ai-popup-animation-slide {
    animation: popupSlide 0.4s ease-out;
}

@keyframes popupFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupZoom {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Toast Animations */
.ai-toast-animation-slide {
    animation: toastSlide 0.3s ease-out;
}

.ai-toast-animation-fade {
    animation: toastFade 0.3s ease-out;
}

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

@keyframes toastFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Emergency Popup Blinking */
.ai-emergency-blinking {
    animation: emergencyBlink 1s infinite;
}

@keyframes emergencyBlink {
    0%, 50% { opacity: 1; }
    25%, 75% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Emergency Warning Banner */
.ai-emergency-warning {
    background: #ff0000 !important;
    color: white !important;
    padding: 10px !important;
    text-align: center !important;
    font-weight: bold !important;
    margin: -30px -30px 20px -30px !important;
    border-radius: 10px 10px 0 0 !important;
}

/* Phone Popup Styles */
.ai-content-phone-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-content-phone-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.ai-content-phone-popup-content {
    position: relative;
    background: #ffffff;
    border-radius: 10px;
    max-width: 300px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: phonePopupSlide 0.3s ease-out;
}

.ai-content-phone-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ai-content-phone-popup-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.ai-content-phone-popup-body {
    padding: 30px 25px 25px 25px;
    text-align: center;
}

.ai-content-phone-popup-body .ai-content-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #222222;
}

.ai-content-phone-popup-body .ai-content-description {
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #555555;
}

.ai-content-phone-popup-body .ai-content-cta {
    display: inline-block;
    padding: 12px 24px;
    background-color: #27ae60;
    color: #ffffff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.ai-content-phone-popup-body .ai-content-cta:hover {
    background-color: #229954;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
    color: #ffffff;
    text-decoration: none;
}

/* Phone Popup Animations */
.phone-animation-vibrate {
    animation: phoneVibrate 0.5s ease-in-out infinite;
}

.phone-animation-pulse {
    animation: phonePulse 2s ease-in-out infinite;
}

.phone-animation-bounce {
    animation: phoneBounce 1s ease-in-out infinite;
}

.phone-animation-shake {
    animation: phoneShake 5.0s ease-in-out infinite;
}

@keyframes phoneVibrate {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

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

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

@keyframes phoneShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.ai-content-phone-popup-body .ai-content-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

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

/* Sticky Bar Styles */
.ai-content-sticky-bar {
    left: 0;
    right: 0;
    z-index: 9996;
    width: 100%;
    min-height: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: stickyBarSlide 0.3s ease-out;
}

.ai-content-sticky-bar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    margin: 0 auto;
   
    background-color: #ffffff;
    position: relative;
}

.ai-content-sticky-bar-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ai-content-sticky-bar-content .ai-content-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    color: #333333;
    flex: 1;
}

.ai-content-sticky-bar-content .ai-content-cta {
    margin-right: 30px;
}

.ai-content-sticky-bar-content .ai-content-cta:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.ai-content-sticky-bar-content .ai-content-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.ai-content-sticky-bar-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

.ai-content-sticky-bar-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

@keyframes stickyBarSlide {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sticky Bar Position Variations */
.ai-content-sticky-bar.ai-sticky-bar-bottom {
    top: auto;
    bottom: 0;
}

.ai-content-sticky-bar.ai-sticky-bar-bottom .ai-content-sticky-bar-container {
    border-top: 1px solid #eee;
    border-bottom: none;
}

.ai-content-sticky-bar.ai-sticky-bar-top {
    top: 0;
    bottom: auto;
}

.ai-content-sticky-bar.ai-sticky-bar-top .ai-content-sticky-bar-container {
    border-bottom: 1px solid #eee;
    border-top: none;
}

/* CTA Button Styles */
.ai-content-cta-button {
    position: fixed;
    z-index: 9995;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ctaButtonSlide 0.3s ease-out;
}

.ai-content-cta-button-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-content-cta-button .ai-content-cta-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    white-space: nowrap;
    text-align: center;
    min-width: 120px;
}

.ai-content-cta-button .ai-content-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.ai-content-cta-button .ai-content-cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

@keyframes ctaButtonSlide {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-box {
    background-color: #ffffff;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.modal-content-wrapper {
    padding: 30px;
}

.modal-heading {
    font-size: 24px;
    font-weight: 600;
    color: #222222;
    margin: 0 0 15px 0;
    text-align: center;
}

.modal-subheading {
    font-size: 18px;
    font-weight: 500;
    color: #666666;
    margin: 0 0 20px 0;
    text-align: center;
}

.modal-content {
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
    margin: 0 0 25px 0;
    text-align: left;
}

.modal-image {
    text-align: center;
    margin: 20px 0;
}

.modal-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-cta {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    text-align: center;
    min-width: 120px;
}

.modal-cta:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.modal-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Modal CTA Container and Alignment */
.modal-cta-container {
    margin: 20px 0;
    text-align: center;
}

.modal-cta-container.align-left {
    text-align: left;
}

.modal-cta-container.align-center {
    text-align: center;
}

.modal-cta-container.align-right {
    text-align: right;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Slide-in Styles */
.slidein-container {
    position: fixed;
    z-index: 9999;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(100%);
    opacity: 0;
    will-change: transform, opacity;
}

.slidein-container.slidein-active {
    transform: translateY(0);
    opacity: 1;
}

.slidein-container.slidein-closing {
    transform: translateY(100%);
    opacity: 0;
}

/* Position-specific animations */
.slidein-container.slidein-bottom-left {
    transform: translateX(-100%) translateY(100%);
}

.slidein-container.slidein-bottom-left.slidein-active {
    transform: translateX(0) translateY(0);
}

.slidein-container.slidein-bottom-left.slidein-closing {
    transform: translateX(-100%) translateY(100%);
}

.slidein-container.slidein-bottom-right {
    transform: translateX(100%) translateY(100%);
}

.slidein-container.slidein-bottom-right.slidein-active {
    transform: translateX(0) translateY(0);
}

.slidein-container.slidein-bottom-right.slidein-closing {
    transform: translateX(100%) translateY(100%);
}

.slidein-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 1;
    transform: scale(1);
}

.slidein-close:hover {
    opacity: 1;
    transform: scale(1.1);
    color: #333;
}

.slidein-close:active {
    transform: scale(0.95);
}

.slidein-heading {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #222222;
    line-height: 1.3;
    animation: slideInContent 0.6s ease-out 0.2s both;
}

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

.slidein-content {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #555555;
    line-height: 1.5;
    animation: slideInContent 0.6s ease-out 0.3s both;
}

.slidein-image {
    margin: 20px 0;
    text-align: center;
    animation: slideInContent 0.6s ease-out 0.4s both;
}

.slidein-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.slidein-cta {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    animation: slideInContent 0.6s ease-out 0.5s both;
}

.slidein-cta:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.slidein-cta:active {
    transform: translateY(0);
}

/* Inline Block Styles */
.ai-inline-block {
    display: block;
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.inline-media {
    margin: 20px 0;
    text-align: center;
}

.inline-media img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.inline-heading {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    color: #222222;
    line-height: 1.3;
}

.inline-content {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #555555;
    line-height: 1.6;
}

.inline-cta {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.inline-cta:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.inline-cta:active {
    transform: translateY(0);
}

/* Full Page Takeover Styles */
.takeover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.takeover-box {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.takeover-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #000;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s ease;
}

.takeover-close:hover {
    color: #333;
}

.takeover-content {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.takeover-content.align-left {
    align-items: flex-start;
}

.takeover-content.align-center {
    align-items: center;
}

.takeover-content.align-right {
    align-items: flex-end;
}

.takeover-heading {
    margin: 0 0 20px 0;
    font-size: 32px;
    font-weight: 700;
    color: #222;
    text-align: center;
}

.takeover-subheading {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 500;
    color: #666;
    text-align: center;
}

.takeover-text {
    margin: 0 0 30px 0;
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    text-align: center;
}

.takeover-image {
    text-align: center;
    margin-bottom: 30px;
}

.takeover-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.takeover-cta {
    display: inline-block;
    padding: 15px 30px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.takeover-cta:hover {
    background: #0056b3;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Responsive Design for Dynamic Content */
@media (max-width: 768px) {
    .ai-content-title {
        font-size: 1.3em;
    }
    
    .ai-content-description {
        font-size: 0.9em;
    }
    
    .ai-content-media {
        margin: 0.5em;
    }
    
    .ai-content-popup-title {
        font-size: 20px;
    }
    
    .ai-content-popup-header {
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .ai-content-title {
        font-size: 1.2em;
    }
    
    .ai-content-description {
        font-size: 0.85em;
    }
    
    .ai-content-cta {
        padding: 8px 16px;
        font-size: 0.85em;
    }
    
    .ai-content-popup-title {
        font-size: 18px;
    }
    
    .ai-content-popup-header {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    
    .ai-content-popup-content {
        padding: 20px;
    }
}