/* Futura LT Font Face Declarations */
@font-face {
  font-family: "Futura LT";
  src: url("../fonts/futura-lt/FuturaLT-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Futura LT";
  src: url("../fonts/futura-lt/FuturaLT.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Futura LT";
  src: url("../fonts/futura-lt/FuturaLT-Bold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Futura LT";
  src: url("../fonts/futura-lt/FuturaLT-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Futura LT";
  src: url("../fonts/futura-lt/FuturaLT-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
}

@font-face {
  font-family: "Futura LT";
  src: url("../fonts/futura-lt/FuturaLT-Heavy.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
}

/* HV Harietta Font Face Declarations */
@font-face {
  font-family: "HV Harietta";
  src: url("../fonts/hv-harietta/HV-Harietta-Regular.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "HV Harietta";
  src: url("../fonts/hv-harietta/HV-Harietta-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

/* Global Font Application */
#aihr-form-container,
#aihr-form-container * {
  font-family: "HV Harietta";
}

#aihr-form-container {
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  padding: 20px;
  max-width: 1000px;
  width: fit-content;
  margin: 0 auto;
  background-color: #f9f9f9;
  border-radius: 0;
}

#aihr-form-container label {
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
}

#aihr-form-container input[type="file"],
#aihr-form-container select {
  margin-bottom: 15px;
  padding: 10px; /* Increased padding for better touch targets */
  border: 1px solid #ccc;
  border-radius: 0;
  width: 100%; /* Full width */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

#aihr-form-container button[type="submit"] {
  width: 100%;
  background-color: #425262;
  color: white;
  padding: 14px 16px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

#aihr-form-container button[type="submit"]:hover {
  background-color: #354152;
  transform: scale(1.02);
  box-shadow: 0px 4px 8px 0px rgba(66, 82, 98, 0.3);
  transition: all 0.2s ease-in-out;
}

#aihr-form-container button[type="submit"]:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.aihr-form-col-1 {
  flex: 1;
}

#aihr-loading {
  margin-top: 15px;
  padding: 30px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: white;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

#aihr-loading p {
  margin: 0;
  color: white;
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
}

#aihr-loading .aihr-loading-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: white;
}

/* AI Brain Animation */
.aihr-ai-brain {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  position: relative;
}

.aihr-brain-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: aihr-brainWave 2s ease-in-out infinite;
}

.aihr-brain-wave:nth-child(1) {
  animation-delay: 0s;
}
.aihr-brain-wave:nth-child(2) {
  animation-delay: 0.4s;
}
.aihr-brain-wave:nth-child(3) {
  animation-delay: 0.8s;
}

.aihr-brain-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

@keyframes aihr-brainWave {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
}

/* Loading Dots Animation */
.aihr-loading-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 15px;
}

.aihr-loading-dots span {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: aihr-loadingDots 1.4s ease-in-out infinite both;
}

.aihr-loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.aihr-loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}
.aihr-loading-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes aihr-loadingDots {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Progress Bar (Optional Enhancement) */
.aihr-progress-container {
  margin: 20px 0 10px;
}

.aihr-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0;
  overflow: hidden;
}

.aihr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd951, #ffed4e);
  border-radius: 0;
  transition: width 0.3s ease;
  animation: aihr-progressShimmer 2s infinite;
}

@keyframes aihr-progressShimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Fallback for old browsers */
#aihr-loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: loading-bar 1.5s infinite;
}

@keyframes loading-bar {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

#aihr-result-container {
  margin-top: 24px;
}

#aihr-result-container img {
  max-width: 100%;
  height: auto;
  margin-top: 10px;
  display: block;
  border-radius: 0;
}

#aihr-result-container h3 {
  font-size: 18px;
  margin: 0 !important;
}

#aihr-error-message {
  margin-top: 15px;
  padding: 10px;
  background-color: #ffebee; /* Light red */
  border: 1px solid #ffcdd2; /* Lighter red */
  color: #c62828; /* Dark red */
  border-radius: 0;
}

.aihr-history-list {
  margin-top: 30px;
}

.aihr-history-list h3 {
  margin: 0 !important;
  color: #2f2e2e !important;
}

/* .aihr-history-list p {
  margin: 0 !important;
  color: white !important;
} */

.aihr-history-list ul {
  list-style: none;
  padding: 0;
}
.aihr-history-list li {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #222;
}
.aihr-history-item .aihr-history-images {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 10px;
}
.aihr-history-item .aihr-history-image-container {
  flex: 1;
  min-width: 200px;
}
.aihr-history-item img {
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 0;
  display: block;
  margin: 8px 0;
}
.aihr-history-item .aihr-download-button {
  display: inline-block;
  margin-top: 4px;
  background: #ebe6df;
  color: black;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 0;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

#aihr-custom-result-container .aihr-download-button {
  display: inline-block;
  margin-top: 4px;
  background: #ebe6df;
  color: black;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  border: 0;
  border-radius: 0;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.aihr-history-item .aihr-download-button:hover {
  background: #ddd8cf;
  color: black;
}

.aihr-style-buttons {
  display: flex;
  gap: 15px;
  margin: 10px 0 20px;
}

.aihr-style-button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.aihr-style-button:hover {
  background-color: #e9ecef;
  transform: translateY(-2px);
}

.aihr-style-button .style-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.aihr-style-button .style-name {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
}

/* Hide the radio inputs */
.aihr-style-button input[type="radio"] {
  display: none;
}

/* Style for selected button */
.aihr-style-button input[type="radio"]:checked + label {
  background-color: #425262;
  border-color: #425262;
  color: white;
}

.aihr-style-button input[type="radio"]:checked + label .style-name {
  color: white;
}

.aihr-variations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns */
  gap: 16px;
  margin-top: 16px;
}

.aihr-variation-item {
  border: 1px solid #ddd;
  padding: 14px;
  border-radius: 0;
  text-align: center;
  background: #fff;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
  cursor: pointer;
  transition: all 0.2s ease;
}

.aihr-variation-item:hover {
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
  transform: scale(1.01);
}

.aihr-variation-item img {
  max-width: 100%;
  height: auto;
  margin-bottom: 15px;
  border-radius: 0;
}

.aihr-variation-item h4 {
  margin: 0;
  color: black;
  font-size: 1rem !important;
  margin-bottom: 8px;
}

.aihr-variation-item .aihr-download-button {
  display: block;
  padding: 8px 16px;
  background-color: transparent;
  color: black;
  border: 1px solid #ddd;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.aihr-variation-item .aihr-download-button:hover {
  color: white;
  background-color: black;
  border: 1px solid black;
}

.aihr-image-url-container {
  margin: 16px 0;
}

.aihr-image-url-container label {
  margin: 0 !important;
}

#aihr-back-to-variations {
  padding: 12px 20px;
  border-radius: 40px;
  background: #e6e6e6;
  color: #222;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#aihr-back-to-variations:hover {
  background: #ddd;
}

/* Mobile responsive - switch to single column on small screens */
@media (max-width: 768px) {
  .aihr-variations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 425px) {
  #aihr-form-container {
    flex-direction: column !important;
  }

  .aihr-history-group-item {
    padding: 14px;
  }
}

/* Image wrapper with overlay */
.aihr-image-wrapper {
  position: relative;
  width: 100%;
}

.aihr-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0;
}

.aihr-image-wrapper:hover .aihr-image-overlay {
  opacity: 1;
}

.aihr-overlay-button {
  padding: 10px 20px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aihr-overlay-button.aihr-download-button {
  background: #ebe6df;
  color: black;
}

.aihr-overlay-button.aihr-download-button:hover {
  background: #ddd8cf;
  color: black;
  transform: translateY(-2px);
}

.aihr-overlay-button.aihr-edit-button {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.aihr-overlay-button.aihr-edit-button:hover {
  background: white;
  color: black;
  transform: translateY(-2px);
}

/* Modal styling */
.aihr-modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.aihr-modal-content {
  position: relative;
  background-color: #fff;
  margin: 4% auto;
  padding: 0;
  border-radius: 0;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: aihr-modal-fadeIn 0.3s ease;
}

@keyframes aihr-modal-fadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aihr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 10px 20px;
  border-bottom: 1px solid #eee;
}

.aihr-modal-header h4 {
  margin: 0 !important;
  font-size: 20px !important;
  font-weight: 600;
  color: #333;
}

.aihr-modal-close-x {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.aihr-modal-close-x:hover {
  background-color: #f5f5f5;
  color: #333;
}

.aihr-modal-body {
  padding: 20px;
}

.aihr-form-group {
  margin-bottom: 16px;
}

.aihr-form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
}

.aihr-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}

.aihr-primary-button {
  background: #425262;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 0;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.aihr-primary-button:hover {
  background: #354152;
}

.aihr-primary-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.aihr-secondary-button {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
  padding: 12px 24px;
  border-radius: 0;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aihr-secondary-button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

/* Modal responsive */
@media (max-width: 768px) {
  .aihr-modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .aihr-modal-actions {
    flex-direction: column-reverse;
  }

  .aihr-modal-actions button {
    width: 100%;
  }
}

/* Floor Changer Loading Animation */
#aihr-floor-changer-loading {
  margin-top: 15px;
  padding: 30px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: white;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  display: none; /* Hidden by default */
}

#aihr-floor-changer-loading p {
  margin: 0;
  color: white;
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
}

#aihr-floor-changer-loading .aihr-loading-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: white;
}

/* Floor changer-specific loading indicator variant */
#aihr-floor-changer-loading .aihr-brain-core {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Custom loading dots for floor changer with different colors */
#aihr-floor-changer-loading .aihr-loading-dots span {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: aihr-loadingDots 1.4s ease-in-out infinite both;
}

#aihr-floor-changer-loading .aihr-loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
  background: #ffd951;
}

#aihr-floor-changer-loading .aihr-loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
  background: #ffed4e;
}

#aihr-floor-changer-loading .aihr-loading-dots span:nth-child(3) {
  animation-delay: 0s;
  background: #f2cd49;
}

/* AI Renovation v2 Loading Animation */
#aihr-nano-loading {
  margin-top: 15px;
  padding: 30px 20px;
  background: linear-gradient(135deg, #354152 0%, #4a5a6e 50%, #5d6f84 100%);
  border: none;
  border-radius: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: white;
  box-shadow: 0 8px 32px rgba(53, 65, 82, 0.3);
  display: none; /* Hidden by default */
}

#aihr-nano-loading p {
  margin: 0;
  color: white;
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
}

#aihr-nano-loading .aihr-loading-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: white;
}

/* AI Renovation v2 loading indicator */
#aihr-nano-loading .aihr-brain-core {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Custom loading dots for AI renovation v2 with theme */
#aihr-nano-loading .aihr-loading-dots span {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: aihr-loadingDots 1.4s ease-in-out infinite both;
}

#aihr-nano-loading .aihr-loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
  background: #ebe6df;
}

#aihr-nano-loading .aihr-loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
  background: #d4cec3;
}

#aihr-nano-loading .aihr-loading-dots span:nth-child(3) {
  animation-delay: 0s;
  background: #c5bfb3;
}

/* AI renovation v2 loading progress bar */
#aihr-nano-loading .aihr-progress-fill {
  background: linear-gradient(90deg, #ebe6df, #d4cec3, #c5bfb3);
  animation: aihr-progressShimmer 2s infinite;
}

/* Custom animation for AI renovation v2 loading effect */
#aihr-nano-loading .aihr-brain-wave {
  border: 2px solid rgba(255, 224, 102, 0.6);
  animation: aihr-nanoBrainWave 2s ease-in-out infinite;
}

@keyframes aihr-nanoBrainWave {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 1;
    border-color: rgba(255, 224, 102, 0.8);
  }
  50% {
    transform: scale(1.2);
    opacity: 0.4;
    border-color: rgba(255, 237, 78, 0.4);
  }
}

/* AI Renovation v2 Result Grid Styling */
.aihr-nano-result-item {
  /* Inherits all styling from .aihr-variation-item */
  /* Remove hover cursor since these are results, not selectable items */
  cursor: default;
}

.aihr-nano-result-item:hover {
  /* Keep the same hover effect but remove the scale transform */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: none;
}

/* Range Slider Styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  background: transparent;
  border-radius: 0;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  margin-top: -6px;
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #425262;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #354152;
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #425262;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  background: #354152;
  transform: scale(1.1);
}

input[type="range"]::-ms-thumb {
  width: 18px;
  height: 18px;
  background: #425262;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-ms-thumb:hover {
  background: #354152;
  transform: scale(1.1);
}

input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(
    to right,
    #425262 0%,
    #425262 var(--value, 75%),
    #ddd var(--value, 75%),
    #ddd 100%
  );
  height: 6px;
  border-radius: 0;
}

input[type="range"]::-moz-range-track {
  background: #ddd;
  height: 6px;
  border-radius: 0;
}

input[type="range"]::-moz-range-progress {
  background: #425262;
  height: 6px;
  border-radius: 0;
}

input[type="range"]::-ms-track {
  background: transparent;
  border-color: transparent;
  color: transparent;
  height: 6px;
}

input[type="range"]::-ms-fill-lower {
  background: #425262;
  border-radius: 0;
}

input[type="range"]::-ms-fill-upper {
  background: #ddd;
  border-radius: 0;
}

/* Example Image Selected State */
.aihr-nano-example-image-item {
  position: relative;
  transition: all 0.3s ease;
}

.aihr-nano-example-image-item.aihr-selected .aihr-nano-copy-link-btn img {
  border: 3px solid #425262 !important;
  box-shadow: 0 0 0 3px rgba(66, 82, 98, 0.2);
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* Checkmark overlay for selected image */
.aihr-nano-example-image-item.aihr-selected::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: #425262;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Hover state for example images */
.aihr-nano-copy-link-btn:hover img {
  border-color: #425262 !important;
  transform: scale(1.02);
  transition: all 0.2s ease;
}

/* Subtle animation for selected state */
@keyframes selectPulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(66, 82, 98, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(66, 82, 98, 0.1);
  }
}

.aihr-nano-example-image-item.aihr-selected .aihr-nano-copy-link-btn img {
  animation: selectPulse 2s infinite;
}

/* ========================================
   SEARCH & FILTER FORM RESPONSIVE STYLES
   ======================================== */

/* Mobile responsive styles for search/filter form */
@media (max-width: 768px) {
  .aihr-search-filter-form > div:first-child {
    grid-template-columns: 1fr !important;
  }

  .aihr-search-filter-form button {
    width: 100%;
  }

  .aihr-search-filter-form > div > div:last-child {
    flex-direction: column;
  }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
  .aihr-search-filter-form > div:first-child {
    grid-template-columns: 1fr 1fr !important;
  }

  .aihr-search-filter-form > div > div:nth-child(5) {
    grid-column: span 2;
    justify-content: flex-start;
  }
}

/* ========================================
   GROUPED HISTORY DISPLAY STYLES
   ======================================== */

/* Group container */
.aihr-history-group-item {
  margin-bottom: 32px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  list-style: none;
}

/* Group grid layout */
.aihr-group-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
}

/* Variations grid - 2x2 layout */
.aihr-variations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Variation item thumbnail */
.aihr-variation-item {
  position: relative;
  border: 1px solid #ddd;
  padding: 4px;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.aihr-variation-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.aihr-variation-thumbnail {
  width: 100%;
  height: auto;
  display: block;
}

/* Delete group button */
.aihr-delete-group {
  padding: 6px 12px;
  background: transparent;
  color: #a9303c;
  border: 1px solid #dac9cb;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}

.aihr-delete-group:hover {
  background: #a9303c;
  color: white;
}

/* Mobile responsive */
@media (max-width: 425px) {
  .aihr-history-group-item {
    padding: 14px;
  }
}

@media (max-width: 768px) {
  .aihr-group-grid {
    grid-template-columns: 1fr !important;
  }

  .aihr-variations-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
  .aihr-group-grid {
    grid-template-columns: 1fr 1.5fr;
  }
}

/* Override text colors for section labels */
.aihr-original-section p,
.aihr-variations-section p {
  color: #333 !important;
  font-weight: 400;
  font-size: 14px;
  margin: 0 0 8px 0;
}

/* ===== Mobile Dropdown Actions (Desktop shows .aihr-actions-desktop only) ===== */

/* Desktop: Hide mobile dropdown, show desktop 4-button layout */
@media (min-width: 769px) {
  .aihr-actions-mobile {
    display: none !important;
  }

  .aihr-actions-desktop {
    display: flex !important;
  }
}

/* Mobile: Hide desktop layout, show dropdown */
@media (max-width: 768px) {
  /* Hide desktop 4-button layout */
  .aihr-actions-desktop {
    display: none !important;
  }

  /* Show mobile dropdown layout */
  .aihr-actions-mobile {
    display: flex !important;
    gap: 8px;
    margin-top: 6px;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  /* Mobile action buttons - same style as desktop */
  .aihr-action-btn-mobile,
  .aihr-more-menu-btn {
    font-size: 16px;
    padding: 10px 14px;
    background: none;
    color: #354152 !important;
    border: 1px solid #ced5dd;
    border-radius: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    text-decoration: none;
    transition: background 0.2s;
  }

  .aihr-action-btn-mobile:hover,
  .aihr-more-menu-btn:hover {
    background: #f1f3f5;
  }

  .aihr-more-menu-btn.active {
    background: #e9ecef;
    border-color: #adb5bd;
  }

  /* Ensure parent has proper stacking context */
  .aihr-variation-item {
    z-index: 1;
  }

  .aihr-variation-item:has(.aihr-mobile-dropdown[style*="display: block"]) {
    z-index: 100;
  }

  /* Dropdown menu container */
  .aihr-mobile-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    min-width: 160px;
    overflow: visible;
  }

  /* Dropdown options */
  .aihr-dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid #f1f3f5;
    color: #354152;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
  }

  .aihr-dropdown-option:last-child {
    border-bottom: none;
  }

  .aihr-dropdown-option:hover {
    background: #f8f9fa;
  }

  .aihr-dropdown-option i {
    font-size: 18px;
    color: #6c757d;
  }

  .aihr-dropdown-option span {
    flex: 1;
  }

  /* Delete option special styling */
  .aihr-dropdown-option.aihr-delete-single {
    color: #dc3545;
  }

  .aihr-dropdown-option.aihr-delete-single i {
    color: #dc3545;
  }

  .aihr-dropdown-option.aihr-delete-single:hover {
    background: #fff5f5;
  }

  /* Adjust footer padding for mobile */
  .aihr-variation-footer {
    padding: 10px 6px !important;
  }
}

/* Get Your Renovation Quoted Button */
#get-your-renovation-quoted {
  border-radius: 0;
  text-transform: none;
  letter-spacing: 0.3px;
}

#get-your-renovation-quoted:hover {
  background: #425363;
  color: #ffffff;
  border-color: #425363;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 83, 99, 0.2);
}

#get-your-renovation-quoted:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(66, 83, 99, 0.15);
}
