/* ==========================================================================
   waa2-plugin.css
   Styles for Slider, Popup, Modal, Validate, Autocomplete, Tooltip, Cookie, Toast, Tabs
   ========================================================================== */

/* ---- Slider ---- */
.slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 800px;
}
.slide {
  display: none;
  width: 100%;
  height: 300px;
  background: #eee;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
}
.slide.active { display: flex; }
.waa2-slider .prev, .waa2-slider .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #0008;
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
}
.waa2-slider .prev { left: 10px; }
.waa2-slider .next { right: 10px; }
.dots {
  text-align: center;
  margin-top: 10px;
}
.waa2-slider .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  border-radius: 50%;
  background: #bbb;
  cursor: pointer;
}
.dot.active { background: #333; }

/* ---- Popup (wow) ---- */
.waa2-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}
.waa2-popup-overlay.active { display: flex; }
.waa2-popup {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 600px;
  width: 90%;
  max-height: 90%;
  overflow: auto;
  position: relative;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.25s ease;
}
.waa2-popup.show { transform: scale(1); opacity: 1; }
.waa2-popup-content { font-size: 16px; line-height: 1.5; }
.waa2-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}
.waa2-popup-close:hover { color: #000; }
@media (max-width: 600px) {
.waa2-popup {
    border-radius: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
  }
}

/* ---- Modal ---- */
.waa2-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 12000;
}
.waa2-modal-overlay.active { display: flex; }
.waa2-modal {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.25s ease;
}
.waa2-modal.show { transform: scale(1); opacity: 1; }
.waa2-modal-header {
  padding: 16px;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.waa2-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
.waa2-modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.waa2-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #ddd;
  background: #f9f9f9;
  text-align: right;
}

/* ---- Validate ---- */
.waa2-invalid { border-color: red !important; }
.waa2-error {
  color: red;
  font-size: 13px;
  margin: 4px 0 8px;
}

/* ---- Autocomplete ---- */
.waa2-autocomplete-list {
  position: absolute;
  background: #fff;
  border: 1px solid #ddd;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  z-index: 10000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.waa2-autocomplete-item { padding: 8px 12px; cursor: pointer; }
.waa2-autocomplete-item:hover,
.waa2-autocomplete-item.active {
  background: #0C48AA;
  color: #fff;
}

/* ---- Tooltip ---- */
.waa2-tooltip {
  position: absolute;
  background: #222;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: all 0.15s ease;
  z-index: 13000;
}
.waa2-tooltip.visible {
  opacity: 0.98;
  transform: translateY(0);
}

/* ---- Cookie Banner ---- */
.waa2-cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #222;
  color: #fff;
  padding: 12px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
}
.waa2-cookie-banner .accept {
  background: #0C48AA;
  color: #fff;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
}

/* ---- Toast ---- */
.waa2-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 11000;
}

.waa2-toast-container.is-left {
  right: auto;
  left: 20px;
}

.waa2-toast {
  background: #333;
  color: #fff;
  padding: 10px 16px;
  margin-bottom: 10px;
  border-radius: 6px;
  opacity: 0.95;
  transition: all 0.3s ease;
}
.waa2-toast.success { background: #28a745; }
.waa2-toast.error { background: #dc3545; }
.waa2-toast.info { background: #007bff; }
.waa2-toast.hide { opacity: 0; transform: translateY(-20px); }

.waa2-toast--rich {
  display: flex;
  color: #333;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

.waa2-toast__media {
  width: 80px;
  height: auto;
}

.waa2-toast__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.waa2-toast__body {
  display: flex;
  flex-direction: column;
}

.waa2-toast__title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
}

.waa2-toast__message {
  font-size: 13px;
  color: #555;
}

.waa2-toast-container--left {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 11000;
}

/* ---- Tabs ---- */
.tabs .tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
}
.tabs .tab-nav [data-tab] {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  background: #f5f5f5;
}
.tabs .tab-nav [data-tab].active {
  background: #fff;
  border: 1px solid #eee;
  border-bottom: none;
} 
.tabs .tab-content { display: none; padding: 12px; border: 1px solid #eee; }
.tabs .tab-content.active { display: block; }


.waa2-dropdown {
  position: relative;
  display: inline-block;
}

/* default → down */
.waa2-dropdown[data-direction="down"] .waa2-dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
}

/* up */
.waa2-dropdown[data-direction="up"] .waa2-dropdown-options {
  position: absolute;
  left: 0;
  margin-bottom: 6px;
}

.waa2-dropdown-options {
  display: none;
  background: #fff;
  border: 1px solid #d9dce1;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 20;
  min-width: 200px;
  padding: 8px 0;
  position: absolute;
}

.waa2-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  color: #253342;
  background-color: #fff;
  border: 1px solid #d9dce1;
  border-radius: 16px;
  cursor: pointer;
  min-width: 200px;
}

.waa2-dropdown-toggle .icon {
  flex-shrink: 0;
}

.waa2-dropdown-options li {
  padding: 10px 16px;
  font-size: 15px;
  color: #253342;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.waa2-dropdown-options li:hover {
  background-color: #f2f4f7;
}
.waa2-dropdown-toggle .icon.arrow {
  transition: transform 0.2s ease;
}

.waa2-dropdown.open .waa2-dropdown-toggle .icon.arrow {
  transform: rotate(180deg);
}

.waa2-dropdown .waa2-dropdown-options { display: none; }
.waa2-dropdown.open .waa2-dropdown-options,
.waa2-dropdown .waa2-dropdown-options.show { display: block; }

.waa2-dropdown[data-direction="down"] .waa2-dropdown-options { top: 100%; }
.waa2-dropdown[data-direction="up"]   .waa2-dropdown-options { bottom: 100%; }