.style-card {
  border: 3px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.style-card:hover {
  transform: scale(1.05);
}
.style-card.selected {
  border-color: #0073aa;
  box-shadow: 0 0 8px rgba(0, 115, 170, 0.6);
}
/* === PROGRESS BAR + LOADER === */
.ai-spinner {
  border: 4px solid rgba(0,0,0,0.1);
  border-left-color: #0073aa;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  margin: 20px auto;
  animation: spin 1s linear infinite;
}

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

.ai-progress-bar {
  width: 80%;
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 20px auto;
  position: relative;
}

.ai-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0073aa, #00b4d8, #0073aa);
  border-radius: 4px;
  transition: width 0.3s ease-in-out;
  animation: gradientMove 3s linear infinite;
  background-size: 200% auto;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.ai-progress-text {
  font-size: 16px;
  color: #333;
  font-style: italic;
  text-align: center;
  margin-top: 10px;
  transition: all 0.3s ease-in-out;
}

/* === GENERATED IMAGE PREVIEW === */
#ai-generated-preview-image {
  width: 280px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  margin-top: 15px;
}

/* === STYLE CARD SELECTION === */
.ai-style-card {
  border: 2px solid transparent;
  border-radius: 10px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}
.ai-style-card:hover {
  transform: scale(1.05);
}
.ai-style-card input[type="radio"] {
  display: none;
}
.ai-style-card img {
  display: block;
  width: 150px;
  height: auto;
}
.ai-style-card input[type="radio"]:checked + img,
.ai-style-card.selected img {
  border: 3px solid #0073aa;
  box-shadow: 0 0 10px rgba(0,115,170,0.5);
}

/* === BUTTONS === */
.ai-button-row button {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  margin: 10px;
}

/* Revise Steps UI */
/* General */
/* Step 1 refined layout */
.ai-step1-flex {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Framed preview (wooden style illusion) */
.ai-frame-preview {
  width: 280px;
  height: 290px;
  background: #fff;
  border: 10px solid #c8b59b;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}
.ai-frame-preview img {
  width: 300px;
  max-height: 100%;
  object-fit: cover;
}


@media only screen and (max-width: 600px) {
	.ai-frame-preview {
	  width: auto;
	  height: auto;
	}
	.ai-step1-flex{
		gap: 0px;
	}
	.ai-upload-box{
		margin-top: 20px;
	}
	.ai-upload-label{
        width: auto !important;
        height: auto !important;
		padding: 100px 110px;
	}
}
/* Upload box */
.ai-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ai-upload-label {
    display: flex;
    background: #f8f4ef;
    /* padding: 0px 100px; */
    border: 2px dashed #bfae96;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 300px;
    height: 290px;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}


.ai-upload-label:hover {
  background: #f1ede7;
}
.ai-upload-icon {
  font-size: 30px;
  margin-bottom: 10px;
  color: #8d7b63;
}
.ai-upload-text {
  font-size: 15px;
  font-weight: 600;
  color: #5b4f3f;
}

/* Typography */
.ai-heading {
  text-align: center;
  font-family: 'Georgia', serif;
  font-size: 28px;
  color: #f0f0f0;
  margin-bottom: 8px;
}
.ai-subheading {
  text-align: center;
  font-size: 15px;
  color: #f0f0f0;
  margin-bottom: 24px;
}

/* Button */
.button.button-primary {
    background: #f0f0f0;
    color: #000000;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-family: 'Inter';
}
.button.button-primary:hover {
  	background: #000;
	color:white;
    transition-duration: 250ms; /* Transition takes 250 milliseconds */
}
.ai-button-row {
  text-align: center;
  margin-top: 30px;
}


/* Step 2 grid */
.ai-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.ai-style-card {
  border: 3px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  display: block;
}
.ai-style-card img {
  width: 100%;
  height: auto;
  display: block;
}
.ai-style-card input[type="radio"] {
  display: none;
}
.ai-style-card input[type="radio"]:checked + img,
.ai-style-card:has(input[type="radio"]:checked) {
  border: 3px solid black;
}

/* Step 3 options */
.ai-options-group {
  margin-bottom: 20px;
}
.ai-options-group label {
  display: block;
  margin-bottom: 8px;
}
.ai-options-group select,
.ai-options-group textarea {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.step-check {
  display: inline-block;
  margin-right: 15px;
  font-size: 14px;
  color: green;
}
.ai-progress-outer {
  width: 60%;
  max-width: 400px;
  height: 12px;
  background-color: #eee;
  margin: 0 auto;
  border-radius: 6px;
  overflow: hidden;
}
.ai-progress-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #000, #555);
  animation: progressGrow 3s linear forwards;
}
.ai-progress-text {
  font-size: 15px;
  margin-bottom: 10px;
  color: #444;
  font-family: 'Georgia', serif;
}

@keyframes progressGrow {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Step 1 */
#ai-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ai-drop-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #9c27b0;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  background: #fdf8ff;
  transition: 0.3s ease;
  max-width: 300px;
  width: 100%;
  margin: 0 auto;
}
.ai-drop-area:hover {
  background: #f5e7ff;
}
.ai-upload-icon {
    width: 100px;
    height: 48px;
    margin-bottom: 10px;
}
.ai-drop-area p {
  margin: 5px 0 3px;
  font-weight: 500;
  color: #444;
}
.ai-drop-area small {
  font-size: 12px;
  color: #777;
}
.ai-preview-image {
  max-width: 240px;
  border-radius: 12px;
  margin: 20px auto;
  display: block;
}
.ai-button-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.ai-progress-bar {
  background: #eee;
  height: 6px;
  width: 100%;
  margin-bottom: 15px;
  border-radius: 4px;
  overflow: hidden;
}
.ai-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #9c27b0, #7c4dff);
  transition: width 0.3s ease;
}
.step-number {
  display: inline-block;
  background: #9c27b0;
  color: white;
  width: 24px;
  height: 24px;
  text-align: center;
  border-radius: 50%;
  font-size: 14px;
  line-height: 24px;
  margin-right: 8px;
}
/* Step 2 */
.ai-style-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}
.ai-style-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 10px;
  transition: 0.2s ease;
}

.ai-style-option input[type="radio"] {
  display: none;
}

.ai-style-option img {
  max-width: 120px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: 0.2s ease;
}

/* ✅ Highlight border when selected */
.ai-style-option input[type="radio"]:checked + img {
  border: 3px solid #9c27b0;
  box-shadow: 0 0 8px rgba(156, 39, 176, 0.5);
}

.ai-style-option span {
  margin-top: 8px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}

/* Step 3 */
.ai-confirm-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 20px;
flex-wrap: nowrap;
}

.ai-confirm-image img {
  max-width: 220px;
  border-radius: 12px;
  border: 2px solid #ccc;
  margin-top: 10px;
}

.ai-confirm-style h4 {
  font-size: 20px;
  color: #333;
}
.ai-label {
  text-align: center;
  margin-top: 8px;
  font-weight: 600;
}

/* Wizard-style layout */
/* #ai-customizer-form,
#ai-step-2,
#ai-step-3 {
  border: 1px solid #ccc;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 6px;
} */

h3 {
  margin-top: 0;
  font-size: 20px;
  color: #333;
}

/* Style selector gallery */
.ai-style-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ai-style-option {
  border: 2px solid transparent;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  border-radius: 6px;
}
.ai-style-option img {
  max-width: 100px;
  height: auto;
  border-radius: 4px;
}
.ai-style-option:hover,
.ai-style-option input:checked + img {
  border: 2px solid #007cba;
}
.ai-style-option input {
  display: none;
}

#ai-step-2-message {
  font-style: italic;
  color: #555;
  margin: 15px 0;
}

#ai-generated-image-result img {
  max-width: 100%;
  border: 1px solid #ccc;
  margin-bottom: 15px;
}

button.button-primary {
  background: #007cba;
  color: white;
  padding: 10px 18px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
button.button-primary:hover {
  background: #005fa3;
}


.ai-style-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.ai-style-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border: 2px solid transparent;
  padding: 10px;
  transition: border-color 0.2s;
}

.ai-style-option input[type="radio"] {
  display: none;
}

.ai-style-option img {
  max-width: 150px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.ai-style-option span {
  margin-top: 8px;
  font-size: 14px;
  text-align: center;
}

.ai-style-option input[type="radio"]:checked + img {
  border: 2px solid #0073aa;
}

.ai-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0073aa;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: auto;
  margin-bottom: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.ai-progress-bar {
  width: 100%;
  background: #f3f3f3;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.ai-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #4caf50 0%, #2196f3 100%);
  animation: fillProgress 2s ease-in-out infinite;
}

@keyframes fillProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}
.ai-progress-text {
  font-size: 16px;
  color: #444;
  font-family: 'Georgia', serif;
}