/* ================= MODAL FUN & MODERN ================= */
body.modal-open {
    overflow: hidden;
}
body.modal-open main {
    filter: blur(3px);
    opacity: 0.35;
    pointer-events: none;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    z-index: 9999;
}
.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 420px;
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    position: relative;
    animation: popIn 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal .close {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}
.modal .close:hover { opacity: 1; }

.modal-content input,
.modal-content textarea,
.modal-content select {
    width: 100%;
    padding: 16px 14px;
    border-radius: 16px;
    border: 1px solid #ddd;
    font-size: 16px;
    background: #f9f9f9;
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.06);
    transition: all 0.25s ease;
}
.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
    outline: none;
    border-color: #FF7EB3;
    box-shadow: 0 0 0 3px rgba(255,126,179,0.15);
}

.modal-content button {
    padding: 14px 0;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #FF7EB3, #FF758C);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(255,126,179,0.3);
    transition: all 0.25s ease;
    border: none;
}
.modal-content button:hover {
    transform: translateY(-2px);
    opacity: 0.95;
    box-shadow: 0 10px 25px rgba(255,126,179,0.35);
}

.modal-switch {
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
}
.modal-switch span {
    color: #FF7EB3;
    cursor: pointer;
    font-weight: 600;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 12px;
    gap: 8px;
}

@keyframes popIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.business-benefits {
    display: none;                 /* hidden by default */
    background: #fff0f5;           /* soft pink background */
    border: 1px solid #ff7eb3;     /* accent border */
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 12px;
    box-shadow: 0 6px 18px rgba(255,126,179,0.25);
    font-size: 0.9rem;
    color: #333;
    animation: fadeSlide 0.3s ease forwards;
}

.business-benefits h4 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: #ff4f8b;
}

.business-benefits ul {
    list-style: disc;
    margin-left: 18px;
}

@keyframes fadeSlide {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.price-wrapper {
  display: none;
}


.photo-uploader {
  margin-top: 12px;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.image-preview-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.ghost-btn {
  background: #f5f5f5;
  border: 1px dashed #bbb;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.hint-text {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}
.rhondda-info {
  background: #e0f7fa;
  border-left: 4px solid #00bcd4;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #006064;
}

.rhondda-warning {
  background: #fff4e5;
  border-left: 4px solid #ff7e5f;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #7a4b00;
  transition: all 0.3s ease;
}

.rhondda-thanks {
  background: #e6ffed;
  border-left: 4px solid #16a34a;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #065f46;
  transition: all 0.3s ease;
}

.hidden {
  display: none;
}


/* ================= POSTCODE INFO ================= */

.postcode-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.8rem;
  color: #6b7280;
}

.not-saved {
  font-weight: 600;
  color: #16a34a;
}

/* Tooltip */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.info-icon {
  cursor: pointer;
  font-size: 0.9rem;
  color: #2563eb;
  user-select: none;
}

.tooltip {
  position: absolute;
  bottom: 140%;
  right: 0;
  width: 220px;
  padding: 8px 10px;

  background: #111827;
  color: #f9fafb;
  font-size: 0.75rem;
  line-height: 1.4;

  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);

  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 50;
}

/* Arrow */
.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 10px;
  border-width: 6px;
  border-style: solid;
  border-color: #111827 transparent transparent transparent;
}

/* Show on hover + tap */
.tooltip-wrapper:hover .tooltip,
.tooltip-wrapper:focus-within .tooltip {
  opacity: 1;
  transform: translateY(0);
}
