/**
 * Public/Frontend Styles for WP WhatsApp Chat Plugin (Minified)
 * @package WP_WhatsApp_Chat
 * @since 1.0.0
 */

/* Floating Button Base Styles */
.wac-floating-button {
  position: fixed;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}
.wac-floating-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.wac-floating-button svg {
  display: block;
}
.wac-shape-circle {
  border-radius: 50%;
}
.wac-shape-rounded-square {
  border-radius: 12px;
}
.wac-shape-square {
  border-radius: 0;
}

/* Button Label */
.wac-button-label {
  position: absolute;
  white-space: nowrap;
  padding: 8px 12px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.wac-button-label.wac-label-hover {
  opacity: 0;
}
.wac-floating-button:hover .wac-button-label.wac-label-hover {
  opacity: 1;
}
.wac-position-bottom-right .wac-button-label,
.wac-position-top-right .wac-button-label {
  right: calc(100% + 12px);
}
.wac-position-bottom-left .wac-button-label,
.wac-position-top-left .wac-button-label {
  left: calc(100% + 12px);
}

/* Static Button (Shortcode) */
.wac-static-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}
.wac-static-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.wac-static-button:active {
  transform: translateY(0);
}

/* Accessibility */
.wac-floating-button:focus,
.wac-static-button:focus {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .wac-floating-button {
    width: 48px !important;
    height: 48px !important;
  }
  .wac-floating-button svg {
    width: 28px !important;
    height: 28px !important;
  }
  .wac-button-label {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* RTL Support */
[dir="rtl"] .wac-position-bottom-right .wac-button-label,
[dir="rtl"] .wac-position-top-right .wac-button-label {
  right: auto;
  left: calc(100% + 12px);
}
[dir="rtl"] .wac-position-bottom-left .wac-button-label,
[dir="rtl"] .wac-position-top-left .wac-button-label {
  left: auto;
  right: calc(100% + 12px);
}

/* Animation for entrance */
@keyframes wac-bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}
.wac-floating-button {
  animation: wac-bounce-in 0.6s ease-out;
}

/* Print - Hide buttons */
@media print {
  .wac-floating-button,
  .wac-static-button {
    display: none !important;
  }
}

/* Language Switcher */
.wac-language-switcher {
  position: fixed;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: inherit;
}

.wac-ls-current {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}
.wac-ls-current:hover {
  transform: scale(1.05);
}

.wac-ls-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 10px;
  background-color: inherit; /* Inherits from dynamic styles */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  min-width: 120px;
  overflow: hidden;
}

.wac-language-switcher:hover .wac-ls-dropdown,
.wac-language-switcher:focus-within .wac-ls-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wac-ls-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s;
  font-size: 14px;
}

.wac-ls-flag {
  width: 20px;
  height: auto;
  margin-right: 8px;
  border-radius: 2px;
}

.wac-ls-code {
  font-weight: bold;
  margin-right: 5px;
}

/* RTL Support for LS */
[dir="rtl"] .wac-ls-flag {
  margin-right: 0;
  margin-left: 8px;
}
[dir="rtl"] .wac-ls-code {
  margin-right: 0;
  margin-left: 5px;
}

/* Mobile Responsiveness for LS */
@media (max-width: 768px) {
  .wac-ls-current {
    padding: 6px 10px;
    font-size: 12px;
  }
  .wac-ls-flag {
    width: 16px;
  }
}
