/* Language Currency Selector Styles - Brizy Products Design */
.pwl-language-currency-selector {
  position: relative;
  display: inline-block;
}

.pwl-lang-curr-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid #000;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.3;
  color: #000;
  text-decoration: none;
  transition: all 0.15s ease;
  border-radius: 0;
  font-weight: 400;
  letter-spacing: 0.025em;
}

.pwl-lang-curr-button:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Button Styles */
.pwl-style-minimal {
  border: 1px solid #000;
  background: transparent;
}

.pwl-style-bordered {
  border: 1px solid #000 !important;
  background: transparent;
}

.pwl-style-filled {
  background: #000 !important;
  color: #fff !important;
  border: 1px solid #000 !important;
}

.pwl-style-filled:hover {
  background: #333 !important;
  border-color: #333 !important;
}

.pwl-flag {
  font-size: 14px;
  line-height: 1;
}

.pwl-lang-curr-text {
  font-weight: 400;
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.pwl-chevron {
  transition: transform 0.15s ease;
  color: currentColor;
  width: 10px;
  height: 10px;
}

.pwl-lang-curr-button.active .pwl-chevron {
  transform: rotate(180deg);
}

/* Complex button color logic */

/* Default: White button (for pages/posts when NOT scrolled and NOT dark-menu) */
.page .pwl-lang-curr-button:not(.scrolled):not(.dark-menu),
.single .pwl-lang-curr-button:not(.scrolled):not(.dark-menu) {
  border-color: #fff;
  color: #fff;
}

.page .pwl-lang-curr-button:not(.scrolled):not(.dark-menu):hover,
.single .pwl-lang-curr-button:not(.scrolled):not(.dark-menu):hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Black button: When scrolled on pages/posts */
.page .scrolled .pwl-lang-curr-button,
.single .scrolled .pwl-lang-curr-button {
  border-color: #000;
  color: #000;
}

.page .scrolled .pwl-lang-curr-button:hover,
.single .scrolled .pwl-lang-curr-button:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Black button: Always black when inside dark-menu on pages/posts */
.page .dark-menu .pwl-lang-curr-button,
.single .dark-menu .pwl-lang-curr-button {
  border-color: #000;
  color: #000;
}

.page .dark-menu .pwl-lang-curr-button:hover,
.single .dark-menu .pwl-lang-curr-button:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Black button: Always black when inside open-mega-menu */
.open-mega-menu .pwl-lang-curr-button {
  border-color: #000 !important;
  color: #000 !important;
  background: transparent !important;
}

.open-mega-menu .pwl-lang-curr-button:hover {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}

/* Black button: Always black when inside scrolled (global rule) */
.scrolled .pwl-lang-curr-button {
  border-color: #000 !important;
  color: #000 !important;
  background: transparent !important;
}

.scrolled .pwl-lang-curr-button:hover {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}

/* Black button: Always black on product pages and WooCommerce pages */
.single-product .pwl-lang-curr-button,
.woocommerce .pwl-lang-curr-button,
.woocommerce-page .pwl-lang-curr-button,
.post-type-archive-product .pwl-lang-curr-button,
.tax-product_cat .pwl-lang-curr-button,
.tax-product_tag .pwl-lang-curr-button,
.woocommerce-cart .pwl-lang-curr-button,
.woocommerce-checkout .pwl-lang-curr-button {
  border-color: #000 !important;
  color: #000 !important;
  background: transparent !important;
}

.single-product .pwl-lang-curr-button:hover,
.woocommerce .pwl-lang-curr-button:hover,
.woocommerce-page .pwl-lang-curr-button:hover,
.post-type-archive-product .pwl-lang-curr-button:hover,
.tax-product_cat .pwl-lang-curr-button:hover,
.tax-product_tag .pwl-lang-curr-button:hover,
.woocommerce-cart .pwl-lang-curr-button:hover,
.woocommerce-checkout .pwl-lang-curr-button:hover {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}

/* Black button: Always black on non-page/non-post pages (shop, archive, etc.) */
.home .pwl-lang-curr-button,
.archive .pwl-lang-curr-button,
.search .pwl-lang-curr-button,
.error404 .pwl-lang-curr-button,
body:not(.page):not(.single) .pwl-lang-curr-button {
  border-color: #000;
  color: #000;
}

.home .pwl-lang-curr-button:hover,
.archive .pwl-lang-curr-button:hover,
.search .pwl-lang-curr-button:hover,
.error404 .pwl-lang-curr-button:hover,
body:not(.page):not(.single) .pwl-lang-curr-button:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Sidebar Panel - Brizy Style */
.pwl-lang-curr-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999999;
  visibility: hidden;
  opacity: 0;
  transition: all 0.25s ease;
}

.pwl-lang-curr-panel.active {
  visibility: visible;
  opacity: 1;
}

.pwl-panel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.pwl-panel-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 90vw;
  background: #fff;
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pwl-lang-curr-panel.active .pwl-panel-content {
  transform: translateX(0);
}

.pwl-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 20px 24px;
  border-bottom: 1px solid #e0e0e0;
}

.pwl-panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #000;
  letter-spacing: 0.02em;
}

.pwl-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #000;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwl-panel-close:hover {
  color: #666;
}

.pwl-panel-close svg {
  width: 18px;
  height: 18px;
}

.pwl-panel-body {
  padding: 24px;
}

.pwl-section {
  margin-bottom: 40px;
}

.pwl-section:last-child {
  margin-bottom: 0;
}

.pwl-section h4 {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  letter-spacing: 0.02em;
}

.pwl-options {
  display: flex;
  flex-direction: column;
  /*gap: 2px;*/
}

.pwl-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  text-decoration: none;
  color: #000;
  transition: all 0.15s ease;
  background: #fff;
  font-size: 14px;
  border-bottom: none;
}

.pwl-option:last-child {
  border-bottom: 1px solid #e0e0e0;
}

.pwl-option:hover {
  background: #f8f8f8;
  text-decoration: none;
  color: #000;
}

.pwl-option.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.pwl-option.active + .pwl-option {
 /* border-top: 1px solid #000; */
}

.pwl-option .pwl-flag {
  font-size: 16px;
  line-height: 1;
}

.pwl-option .pwl-symbol {
  font-size: 14px;
  font-weight: 500;
  min-width: 18px;
}

.pwl-option .pwl-label {
  flex: 1;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.pwl-option .pwl-code {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Editor Styles */
.pwl-language-currency-selector-editor {
  padding: 16px;
  border: 1px dashed #ccc;
  border-radius: 4px;
  background: #f9f9f9;
}

.pwl-language-currency-selector-editor .pwl-lang-curr-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: default;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

.pwl-language-currency-selector-editor .pwl-style-minimal {
  border: none;
  background: transparent;
}

.pwl-language-currency-selector-editor .pwl-style-bordered {
  border: 1px solid #333 !important;
}

.pwl-language-currency-selector-editor .pwl-style-filled {
  background: #f0f0f0 !important;
  border: 1px solid #ddd !important;
}

.editor-note {
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  font-style: italic;
  text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .pwl-panel-content {
    width: 100%;
    max-width: none;
  }
  
  .pwl-lang-curr-button {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .pwl-panel-header {
    padding: 16px;
  }
  
  .pwl-panel-body {
    padding: 16px;
  }
  
  /* Mobile: Always black button regardless of context */
  .pwl-lang-curr-button {
    border-color: #000 !important;
    color: #000 !important;
    background: transparent !important;
  }
  
  .pwl-lang-curr-button:hover {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
  }
}
