/**
 * @file
 * Styles for Lineage Locale Selector popup.
 */

.lineage-locale-selector-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  width: calc(100% - 40px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.lineage-locale-selector-popup.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lineage-locale-selector-popup-content {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 24px;
  position: relative;
  border: 1px solid #e0e0e0;
}

.lineage-locale-selector-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lineage-locale-selector-close:hover,
.lineage-locale-selector-close:focus {
  background-color: #f0f0f0;
  color: #333;
  outline: none;
}

.lineage-locale-selector-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #333;
  padding-right: 30px;
}

.lineage-locale-selector-message {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin: 0 0 20px 0;
}

.lineage-locale-selector-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.lineage-locale-selector-btn-primary,
.lineage-locale-selector-btn-secondary {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  text-align: center;
  flex: 1;
}

.lineage-locale-selector-btn-primary {
  background-color: #0067a0;
  color: #ffffff;
  border-color: #0067a0;
  text-transform: uppercase;
  font-weight: 600;
}

.lineage-locale-selector-btn-primary:hover,
.lineage-locale-selector-btn-primary:focus {
  background-color: #ffffff;
  border-color: #0067a0;
  color: #0067a0;
  outline: none;
}

.lineage-locale-selector-btn-secondary {
  background-color: #ffffff;
  color: #0067a0;
  border: 1px solid #0067a0;
  text-transform: uppercase;
  font-weight: 600;
}

.lineage-locale-selector-btn-secondary:hover,
.lineage-locale-selector-btn-secondary:focus {
  background-color: #0067a0;
  border-color: #0067a0;
  color: #ffffff;
  outline: none;
}

/* Mobile styles - bottom centered */
@media (max-width: 768px) {
  .lineage-locale-selector-popup {
    bottom: 20px;
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    max-width: calc(100% - 40px);
    width: calc(100% - 40px);
  }

  .lineage-locale-selector-popup.active {
    transform: translateX(-50%) translateY(0);
  }

  .lineage-locale-selector-popup-content {
    padding: 20px;
  }

  .lineage-locale-selector-title {
    font-size: 18px;
  }

  .lineage-locale-selector-message {
    font-size: 14px;
  }

  .lineage-locale-selector-actions {
    flex-direction: column;
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .lineage-locale-selector-popup {
    max-width: 380px;
  }
}

/* Ensure popup doesn't interfere with other elements */
.lineage-locale-selector-popup * {
  box-sizing: border-box;
}

/* Accessibility improvements */
.lineage-locale-selector-popup[role="dialog"] {
  outline: none;
}

.lineage-locale-selector-close:focus,
.lineage-locale-selector-btn-primary:focus,
.lineage-locale-selector-btn-secondary:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

