/**
 * PolymerFix Custom Styles
 * Additional styles beyond the main style.css
 */

/* ===================================
   Modal Styles
   =================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: hsl(var(--card));
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: hsl(var(--muted-foreground));
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: hsl(var(--foreground));
}

.modal-form {
  padding: 1.5rem;
}

/* ===================================
   Dropdown Menu Styles
   =================================== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-content {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: hsl(var(--card));
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 50;
}

.nav-dropdown:hover .nav-dropdown-content {
  opacity: 1;
  visibility: visible;
}

.nav-dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  border-radius: calc(var(--radius) - 2px);
  transition: background 0.2s ease;
}

.nav-dropdown-item:hover {
  background: hsl(var(--secondary));
  color: hsl(var(--primary));
}

/* ===================================
   Form Enhancements
   =================================== */
.form-success {
  background: hsl(145 63% 32% / 0.1);
  border: 1px solid hsl(var(--primary));
  color: hsl(var(--primary));
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  margin-top: 1rem;
}

.form-error {
  background: hsl(0 84% 60% / 0.1);
  border: 1px solid hsl(var(--destructive));
  color: hsl(var(--destructive));
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  margin-top: 1rem;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===================================
   Page Header
   =================================== */
.page-header {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  color: white;
  padding: 6rem 0 4rem;
  text-align: center;
}

.page-header h1 {
  color: white;
  margin-bottom: 1rem;
}

.page-header p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
}

/* ===================================
   Breadcrumbs
   =================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
  justify-content: center;
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumbs a:hover {
  color: white;
}

.breadcrumbs span {
  color: white;
}

/* ===================================
   Service Detail Page
   =================================== */
.service-detail {
  padding: 4rem 0;
}

.service-detail-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .service-detail-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.service-detail-image {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.service-features {
  margin: 2rem 0;
}

.service-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: hsl(var(--secondary));
  border-radius: var(--radius);
}

.service-feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: hsl(var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.service-sidebar {
  background: hsl(var(--secondary));
  padding: 2rem;
  border-radius: var(--radius);
  height: fit-content;
  position: sticky;
  top: 6rem;
}

.service-sidebar h3 {
  margin-bottom: 1.5rem;
}

.other-services-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.other-services-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: hsl(var(--card));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  transition: all 0.3s ease;
}

.other-services-link:hover {
  background: hsl(var(--primary));
  color: white;
}

/* ===================================
   Loading Spinner
   =================================== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===================================
   Toast Notifications
   =================================== */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: hsl(var(--card));
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-success {
  border-left: 4px solid hsl(var(--primary));
}

.toast-error {
  border-left: 4px solid hsl(var(--destructive));
}

/* ===================================
   WordPress Specific
   =================================== */
.wp-block-image img {
  border-radius: var(--radius);
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
  margin-top: 0.5rem;
}

/* Pagination */
.navigation.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  background: hsl(var(--secondary));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.page-numbers:hover,
.page-numbers.current {
  background: hsl(var(--primary));
  color: white;
}

/* Screen Reader Text */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
