.coolify-subdomain-field {
  margin: 20px 0;
  padding: 15px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.coolify-subdomain-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.coolify-subdomain-field label .required {
  color: #e74c3c;
}

.subdomain-input-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.subdomain-input-wrapper input {
  flex: 1;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.subdomain-input-wrapper input:focus {
  outline: none;
  border-color: #3498db;
}

.subdomain-suffix {
  font-weight: 600;
  color: #666;
  white-space: nowrap;
}

.subdomain-status {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  min-height: 20px;
}

.subdomain-status.checking {
  color: #3498db;
}

.subdomain-status.available {
  color: #27ae60;
}

.subdomain-status.taken,
.subdomain-status.invalid {
  color: #e74c3c;
}

.subdomain-help {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #666;
}

/* Disable add to cart button styling when subdomain is invalid */
.single_add_to_cart_button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modern Compact Toggle Buttons */
.domain-type-toggle-group {
  display: flex;
  gap: 10px;
  width: 100%;
}

.domain-toggle-option {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.domain-toggle-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.domain-toggle-option .toggle-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #50575e;
  transition: all 0.2s ease;
  height: 40px; /* Fixed height */
  box-sizing: border-box;
  text-align: center;
}

.domain-toggle-option:hover .toggle-content {
  border-color: #2271b1;
  color: #2271b1;
  background: #f6f7f7;
}

.domain-toggle-option input[type="radio"]:checked + .toggle-content {
  background: #2271b1;
  border-color: #2271b1;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(34, 113, 177, 0.2);
}

/* Custom Domain Explanation - Hidden by default, shown when custom is checked */
.custom-domain-explanation {
  display: none; /* Default hidden */
  margin-top: 15px;
  animation: fadeIn 0.3s ease;
}

body:has(.domain-toggle-option input[value="custom"]:checked) .custom-domain-explanation {
  display: block;
}

/* Fallback/Additional styling for the explanation box */
.explanation-box {
  background: #f0f6fc;
  border-left: 4px solid #2271b1;
  padding: 12px 16px;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: #1d2327;
}

.explanation-box p {
  margin: 0 0 5px 0;
}

.explanation-box p:last-child {
  margin: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Add modern card hover effects and checked state */
.domain-type-card {
  overflow: hidden;
  position: relative;
}

.domain-type-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.domain-type-card:hover::before {
  opacity: 1;
}

.domain-type-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.domain-type-card:has(input[type="radio"]:checked) {
  border-color: #fff !important;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.3) !important;
}

.domain-type-card:has(input[type="radio"]:checked)::after {
  content: "✓";
  position: absolute;
  top: 16px;
  right: 48px;
  width: 24px;
  height: 24px;
  background: #fff;
  color: #667eea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* Responsive design for mobile */
@media (max-width: 640px) {
  .domain-type-selection > div {
    grid-template-columns: 1fr !important;
  }

  .domain-type-card {
    padding: 20px !important;
  }

  .domain-type-card h4 {
    font-size: 16px !important;
  }

  .domain-type-card svg {
    width: 28px !important;
    height: 28px !important;
  }
}
