/* Top Messages ACF Plugin Styles with Swiper */

.tma-message-block {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  background: var(--item-bg-color, #fff);
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.tma-message-block.tma-visible {
  opacity: 1;
  transform: translateY(0);
}

.tma-message-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 50px 15px 20px;
}

.tma-close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  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;
  z-index: 10;
}

.tma-close-button:hover {
  background: #f5f5f5;
  color: #333;
}

/* Swiper container */
.tma-swiper {
  position: relative;
  min-height: 40px;
  overflow: hidden;
}

/* Swiper slides */
.tma-swiper .swiper-slide {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.tma-message {
  width: 100%;
}

.tma-message p {
  margin: 0 0 10px 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--item-text-color, #000);
}

.tma-message p:last-child {
  margin-bottom: 0;
}

.tma-message a {
  color: var(--item-link-color, #0073aa);
  text-decoration: none;
}

.tma-message a:hover {
  text-decoration: underline;
}

.tma-message strong {
  font-weight: 600;
}

.tma-message ul,
.tma-message ol {
  margin: 10px 0;
  padding-left: 20px;
}

.tma-message li {
  margin: 5px 0;
}

/* Custom Swiper navigation arrows */
.tma-nav-prev,
.tma-nav-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  user-select: none;
}

.tma-nav-prev:hover,
.tma-nav-next:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.1);
}

.tma-nav-prev {
  left: 10px;
}

.tma-nav-next {
  right: 10px;
}

/* Custom arrow icons */
.tma-nav-prev::after,
.tma-nav-next::after {
  font-family: "Arial", sans-serif;
  font-weight: bold;
  color: white;
  font-size: 16px;
}

.tma-nav-prev::after {
  content: "‹";
}

.tma-nav-next::after {
  content: "›";
}

/* RTL Support */
[dir="rtl"] .tma-nav-prev {
  left: auto;
  right: 10px;
}

[dir="rtl"] .tma-nav-next {
  right: auto;
  left: 10px;
}

[dir="rtl"] .tma-nav-prev::after {
  content: "›";
}

[dir="rtl"] .tma-nav-next::after {
  content: "‹";
}

/* Hide navigation when swiper is disabled */
.swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
/* Animation for slide down */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Body padding when message block is shown */
body.tma-message-active {
  transition: padding-top 0.5s ease;
}

/* Responsive design */
@media (max-width: 768px) {
  .tma-message-container {
    padding: 12px 40px 12px 15px;
  }

  .tma-close-button {
    top: 8px;
    right: 10px;
    font-size: 20px;
    width: 25px;
    height: 25px;
  }

  .tma-message p {
    font-size: 14px;
  }

  .tma-nav-prev,
  .tma-nav-next {
    width: 28px;
    height: 28px;
  }

  .tma-nav-prev::after,
  .tma-nav-next::after {
    font-size: 14px;
  }

  .tma-nav-prev {
    left: 5px;
  }

  .tma-nav-next {
    right: 5px;
  }

  /* RTL Support for mobile */
  [dir="rtl"] .tma-nav-prev {
    left: auto;
    right: 5px;
  }

  [dir="rtl"] .tma-nav-next {
    right: auto;
    left: 5px;
  }
} /* Themes */
.tma-message-block.tma-theme-success {
  background: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.tma-message-block.tma-theme-warning {
  background: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.tma-message-block.tma-theme-error {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.tma-message-block.tma-theme-info {
  background: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

/* Styles for WordPress admin */
body.wp-admin .tma-message-block {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.wp-admin .tma-message-block {
    top: 46px;
  }
}
