@import 'bootstrap/scss/functions';
@import 'bootstrap/scss/variables';
@import 'bootstrap/scss/mixins';

.banner-container {
  width: 100%;
  background-color: #004445;
  color: white;
}

.banner-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;

  // RTL support
  [dir='rtl'] & {
    direction: rtl;
  }
}

.title-section {
  display: flex;
  align-items: center;
  gap: 1rem;

  // RTL support - reverse the order and adjust spacing
  [dir='rtl'] & {
    flex-direction: row-reverse;
  }
}

.city-name {
  font-weight: bold;
  text-transform: uppercase;
  display: inline-flex;
  flex-direction: column;
  align-items: center;

  > span {
    display: inline-flex;
    flex-direction: column;
    align-items: center;

    &:first-child {
      font-size: 0.75rem;
      line-height: 1;
    }

    &:last-child {
      font-size: 1rem;
    }
  }
}

.official-text {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;

  .know-text {
    display: inline-flex;
    align-items: center;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 0.25rem;
    background-color: transparent;
    border: none;
    color: inherit;
    padding: 0;
    font-size: inherit;

    // RTL support - adjust margin
    [dir='rtl'] & {
      margin-left: 0;
      margin-right: 0.25rem;
    }

    &:focus {
      outline: none;
      text-decoration-thickness: from-font;
      text-decoration-color: #f8d568;
    }

    &:hover {
      text-decoration-color: #f8d568;
    }

    .chevron-container {
      display: inline-flex;
      align-items: center;
      margin-left: 0.25rem;

      // RTL support - adjust margin
      [dir='rtl'] & {
        margin-left: 0;
        margin-right: 0.25rem;
      }

      svg {
        transition: transform 0.2s ease;
        width: 12px;
        height: 12px;

        &[aria-expanded='true'] {
          transform: rotate(180deg);
        }
      }
    }
  }
}

.content-container {
  background-color: #f8f9fa;
  width: 100%;
  border-top: 1px solid #dee2e6;

  // RTL support
  [dir='rtl'] & {
    direction: rtl;
  }
}

.info-section {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  gap: 2rem;

  // RTL support
  [dir='rtl'] & {
    flex-direction: row-reverse;
  }
}

.info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex: 1;

  // RTL support - reverse the flex direction for Arabic
  [dir='rtl'] & {
    flex-direction: row-reverse;
    text-align: right;
  }

  .info-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    display: block;
  }

  p {
    margin: 0;
    line-height: 1.5;
    color: #495057;
    font-size: 0.875rem;
  }
}

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #dee2e6;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gov-icon,
.lock-icon {
  font-size: 1.5rem;
  color: #004445;
}

// Tablet and Mobile shared styles
@include media-breakpoint-down(lg) {
  .official-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.0625rem;
  }

  .know-text {
    display: flex;
    justify-content: center;
    margin-top: 0.0625rem;
    width: 100%;

    // RTL support - reset margins for mobile
    [dir='rtl'] & {
      margin-left: 0;
      margin-right: 0;
    }
  }

  .city-name {
    margin-top: 0.25rem;
    flex-shrink: 0;
  }
}

// Mobile-specific overrides
@include media-breakpoint-down(sm) {
  .banner-header {
    justify-content: flex-start;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;

    // RTL support - adjust alignment for mobile
    [dir='rtl'] & {
      justify-content: flex-end;
    }
  }

  .official-text {
    align-items: flex-start;
    text-align: center;
    word-wrap: break-word;

    // RTL support
    [dir='rtl'] & {
      align-items: flex-end;
    }
  }

  .info-section {
    flex-direction: column;
    padding: 1rem;
    gap: 1.5rem;
  }

  .info-item {
    width: 100%;
  }
}
