/**
 * Banner Service Styles
 * 
 * Provides responsive, accessible styling for site banners
 * Supports multiple banner types with distinct visual themes
 */

/* ===========================
 Banner Container
   =========================== */

.banner-container {
    position: relative;
    z-index: 1000;
    margin: 0;
    padding: 0;
}

/* ===========================
   Banner Base Styles
   =========================== */

.banner {
    position: relative;
    padding: 1rem 1.5rem;
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-out;
}

.banner-visible {
    opacity: 1;
    transform: translateY(0);
}

.banner-dismissing {
    opacity: 0;
    transform: translateY(-20px);
}

/* ===========================
   Banner Content Layout
   =========================== */

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
 gap: 1rem;
}

.banner-icon-wrapper {
    flex-shrink: 0;
  display: flex;
    align-items: center;
    justify-content: center;
}

.banner-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.banner-text {
    flex: 1;
    min-width: 0;
}

.banner-title {
  margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 700;
  line-height: 1.3;
}

.banner-message {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.95;
}

.banner-actions {
    flex-shrink: 0;
}

.banner-cta {
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
 white-space: nowrap;
 text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
}

.banner-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.banner-dismiss {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 4px;
    transition: all 0.2s ease;
 display: flex;
    align-items: center;
    justify-content: center;
  font-size: 1rem;
}

.banner-dismiss:hover {
    opacity: 1;
 background: rgba(0, 0, 0, 0.1);
}

.banner-dismiss:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    opacity: 1;
}

/* ===========================
   Banner Type Styles
   =========================== */

/* Info Banner */
.banner-info {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  color: white;
}

.banner-info .banner-cta {
    background: white;
    color: #0d6efd;
    border: 2px solid white;
}

.banner-info .banner-cta:hover {
    background: rgba(255, 255, 255, 0.95);
}

/* Promo Banner */
.banner-promo {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
    color: white;
}

.banner-promo .banner-cta {
    background: #ffc107;
    color: #6f42c1;
  border: 2px solid #ffc107;
}

.banner-promo .banner-cta:hover {
    background: #ffcd39;
}

/* Announcement Banner */
.banner-announcement {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
    color: #000;
}

.banner-announcement .banner-cta {
    background: #212529;
    color: white;
    border: 2px solid #212529;
}

.banner-announcement .banner-cta:hover {
    background: #343a40;
}

/* Success Banner */
.banner-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    color: white;
}

.banner-success .banner-cta {
    background: white;
    color: #198754;
    border: 2px solid white;
}

.banner-success .banner-cta:hover {
    background: rgba(255, 255, 255, 0.95);
}

/* Warning Banner */
.banner-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #000;
}

.banner-warning .banner-cta {
  background: #212529;
    color: white;
    border: 2px solid #212529;
}

.banner-warning .banner-cta:hover {
    background: #343a40;
}

/* Alert/Danger Banner */
.banner-alert {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: white;
}

.banner-alert .banner-cta {
    background: white;
 color: #dc3545;
    border: 2px solid white;
}

.banner-alert .banner-cta:hover {
    background: rgba(255, 255, 255, 0.95);
}

/* ===========================
   Accessibility
   =========================== */

.banner:focus-within {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: -3px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .banner {
    border: 2px solid currentColor;
    }

  .banner-dismiss {
        border: 1px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .banner,
    .banner-visible,
    .banner-dismissing,
    .banner-cta,
 .banner-dismiss {
        transition: none;
        animation: none;
    }

    .banner {
        opacity: 1;
        transform: none;
    }
}

/* ===========================
   Responsive Design
   =========================== */

/* Tablet */
@media (max-width: 992px) {
    .banner {
        padding: 1rem;
    }

    .banner-content {
        gap: 0.75rem;
    }

.banner-title {
        font-size: 0.95rem;
    }

    .banner-message {
        font-size: 0.85rem;
    }

 .banner-cta {
        padding: 0.4rem 1.25rem;
    font-size: 0.813rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .banner {
      padding: 0.875rem;
    }

    .banner-content {
        flex-wrap: wrap;
   gap: 0.75rem;
     padding-right: 2rem; /* Space for dismiss button */
    }

    .banner-icon-wrapper {
        align-self: flex-start;
    }

  .banner-icon {
        font-size: 1.25rem;
    }

    .banner-text {
        flex-basis: 100%;
 order: 2;
    }

    .banner-title {
   font-size: 0.9rem;
    }

    .banner-message {
        font-size: 0.813rem;
    }

    .banner-actions {
     flex-basis: 100%;
        order: 3;
    }

    .banner-cta {
        width: 100%;
        text-align: center;
        padding: 0.625rem 1rem;
    }

    .banner-dismiss {
   top: 0.5rem;
        right: 0.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .banner {
    padding: 0.75rem;
    }

    .banner-content {
     gap: 0.5rem;
    }

    .banner-title {
    font-size: 0.875rem;
    }

    .banner-message {
        font-size: 0.75rem;
  }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    .banner-container {
   display: none;
    }
}

/* ===========================
   Dark Mode Support (Optional)
   =========================== */

@media (prefers-color-scheme: dark) {
    /* Adjust colors for dark mode if needed */
    .banner {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}
