/**
 * @file
 * State Selection Modal Styles
 * Matches Figma design for United States state selection popup
 */

/* Filter Layout */
.view-photographers-by-category .view-filters form {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  margin: 40px 0;
}

.view-photographers-by-category .form-item-country {
  margin: 0;
}

.view-photographers-by-category .country-filter-select {
  padding: 12px 40px 12px 20px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid #ddd;
  background: #fff;
  color: #1a1a1a;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%231a1a1a' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  min-width: 200px;
}

.filter-by-wrapper {
  display: none !important;
  align-items: center;
  gap: 15px;
  pointer-events: none !important;
  visibility: hidden !important;
}

.filter-by-wrapper.show {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.filter-by-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.select-location-button {
  padding: 12px 30px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #1a1a1a;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
}

.select-location-button:hover {
  background: #000;
  border-color: #000;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Modal Overlay */
.state-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Modal Container */
.state-modal-container {
  background: #fff;
  border-radius: 0;
  max-width: 1124px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Modal Header */
.state-modal-header {
  padding: 40px 50px 30px;
  position: relative;
  text-align: center;
}

.state-modal-title {
  font-family: Cormorant Garamond;
  font-weight: 300;
  font-style: Light;
  font-size: 42px;
  line-height: 46.2px;
  letter-spacing: 0.84px;
  text-align: center;
  color: rgba(0, 0, 0, 1);
}

.state-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.state-modal-close:hover {
  color: #1a1a1a;
}

/* Modal Body */
.state-modal-body {
  padding: 40px 50px;
  overflow-y: auto;
  flex: 1;
}

/* State Grid */
.state-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 30px;
  row-gap: 20px;
  column-gap: 30px;
}

.state-item {
  font-family: Lato;
  font-weight: 400;
  font-style: Regular;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: 0%;
  vertical-align: middle;
  text-transform: uppercase;
  padding: 0;
  background: transparent;
  border: none;
  color: rgba(102, 102, 102, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.state-item:hover {
  color: #666;
  text-decoration: underline;
}

/* Responsive Modal Styles */
@media (max-width: 992px) {
  .state-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .state-modal-header {
    padding: 30px 40px 25px;
  }
  
  .state-modal-body {
    padding: 30px 40px;
  }
  
  .state-modal-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .state-modal-container {
    max-height: 85vh;
  }
  
  .state-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .state-modal-header {
    padding: 25px 30px 20px;
  }
  
  .state-modal-body {
    padding: 25px 30px;
  }
  
  .state-modal-title {
    font-size: 1.5rem;
    padding-right: 30px;
  }
  
  .state-item {
    font-size: 0.8125rem;
  }
}

@media (max-width: 576px) {
  .state-modal-overlay {
    padding: 10px;
  }
  
  .state-modal-container {
    max-height: 95vh;
  }
  
  .state-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .state-modal-header {
    padding: 20px 20px 15px;
  }
  
  .state-modal-body {
    padding: 20px;
  }
  
  .state-modal-title {
    font-size: 1.25rem;
  }
  
  .state-modal-close {
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    font-size: 1.75rem;
  }
}
