/**
 * Bear Forest App - WordPress Integration Styles
 * Properly scoped to avoid conflicts with WordPress themes
 */

/* Main container - ensure everything stays contained */
.bear-forest-app-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  font-family: Arial, sans-serif;
  color: #333;
  box-sizing: border-box;
}

/* Make sure all elements inside use border-box */
.bear-forest-app-container * {
  box-sizing: border-box;
}

/* Language switcher */
.bear-forest-app-container .language-switcher {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
  gap: 10px;
}

.bear-forest-app-container .language-button {
  padding: 5px 10px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.bear-forest-app-container .language-button:hover {
  background: #e0e0e0;
}

/* Map container */
.bear-forest-app-container #map-container {
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: hidden;
  text-align: center;
  position: relative;
  margin: 0 auto 20px auto;
}

.bear-forest-app-container #berenbos-map {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Tooltip for hover information */
.bear-forest-app-container #tooltip {
  position: absolute;
  background-color: rgba(0,0,0,0.7);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  pointer-events: none;
  max-width: 250px;
}

/* SVG element interaction */
.bear-forest-app-container rect {
  cursor: pointer;
  stroke: #000;
  stroke-width: 1;
}

.bear-forest-app-container rect:focus {
  outline: 2px solid blue;
}

/* Selection summary - positioned within the container */
.bear-forest-app-container .selection-summary {
  width: 100%;
  margin: 20px 0;
  padding: 15px;
  background-color: #453535;
  border-radius: 16px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bear-forest-app-container .summary-texts {
  display: flex;
  flex-direction: column;
}

.bear-forest-app-container #plots-selected-text,
.bear-forest-app-container #total-cost-text {
  margin: 5px 0;
  font-size: 14px;
}

.bear-forest-app-container #order-button {
  padding: 8px 16px;
  border: none;
  border-radius: 22px;
  background-color: #EF7C00;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.bear-forest-app-container #order-button:hover {
  background-color: #d46c00;
}

/* Owners panel - positioned properly within container */
.bear-forest-app-container .owners-panel {
  width: 100%;
  max-width: 100%;
  margin: 20px 0;
  background: #fff8f0;
  border-left: 4px solid #f47920;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  border-radius: 10px;
  position: relative;
}

.bear-forest-app-container #owners-title {
  margin-top: 0;
  color: #f47920;
  font-size: 18px;
  font-weight: bold;
}

.bear-forest-app-container #owners-panel-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f47920;
  border: none;
  padding: 5px 10px;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.bear-forest-app-container #owners-panel-toggle:hover {
  background: #e0681d;
}

.bear-forest-app-container #owners-list {
  list-style-type: none;
  padding: 0;
  margin: 15px 0 0 0;
}

.bear-forest-app-container #owners-list li {
  margin: 8px 0;
  padding: 10px;
  background: #ffe1c4;
  border-radius: 8px;
  font-size: 14px;
  color: #5a3d31;
}

.bear-forest-app-container #owners-panel-reopen {
  display: block;
  margin: 10px 0;
  background: #f47920;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
}

/* Hide/show panel toggle button */
.bear-forest-app-container .owners-panel.closed {
  display: none;
}

.bear-forest-app-container .owners-panel.closed + #owners-panel-reopen {
  display: block;
}

/* Checkout form styles - scoped to the app container */
.bear-forest-app-container .form-container {
  padding: 20px;
  background: white;
  border-radius: 8px;
  margin-top: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.bear-forest-app-container .form-group {
  margin-bottom: 15px;
}

.bear-forest-app-container .form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.bear-forest-app-container .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.bear-forest-app-container .form-row .form-group {
  flex: 1 0 200px;
}

.bear-forest-app-container input[type="text"],
.bear-forest-app-container input[type="email"],
.bear-forest-app-container input[type="tel"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.bear-forest-app-container #payment-button {
  width: 100%;
  padding: 10px;
  background: #f47920;
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bear-forest-app-container .form-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .bear-forest-app-container .selection-summary {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .bear-forest-app-container #order-button {
    width: 100%;
  }
}