/* ========================================
   WC Return & Cancel Form Styles
   Brand Color: #561c24
   ======================================== */

/* ---------- Wrapper & Layout ---------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
.wcrcf-wrapper {
  max-width: 720px;
  margin: 32px auto;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #2e2e2e;
}

.wcrcf-form {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid rgba(86, 28, 36, 0.08);
  box-shadow: 0 8px 24px rgba(86, 28, 36, 0.08);
  transition: box-shadow 0.3s ease;
}

.wcrcf-form:hover {
  box-shadow: 0 12px 36px rgba(86, 28, 36, 0.12);
}

/* ---------- Title ---------- */
.wcrcf-title {
  width: 100%;
  text-align: center !important;
  font-size: 24px;
  font-weight: 700;
  color: #561c24 !important;
  margin: 0 0 24px;
  letter-spacing: 0.4px;
}

/* ---------- Fields ---------- */
.wcrcf-field {
  margin-bottom: 15px;
  position: relative;
}

.wcrcf-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #3b3b3b;
  font-size: 15px;
}

/* 🟢 Rounded Inputs */
.wcrcf-field input[type="text"],
.wcrcf-field input[type="tel"],
.wcrcf-field input[type="email"],
.wcrcf-field textarea {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  border: 1px solid rgba(86, 28, 36, 0.25);
  padding: 14px 20px;
  border-radius: 9999px !important;
  font-size: 15px;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.wcrcf-field textarea {
  border-radius: 20px !important;
}

.wcrcf-field input:focus,
.wcrcf-field textarea:focus {
  outline: none;
  border-color: #561c24;
  box-shadow: 0 0 0 4px rgba(86, 28, 36, 0.1);
}

/* ---------- Custom Select Dropdown (Full Popup Style) ---------- */
.custom-select {
  position: relative;
  user-select: none;
  border: 1px solid rgba(86, 28, 36, 0.25);
  border-radius: 9999px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger {
  padding: 14px 44px 14px 18px;
  font-size: 15px;
  color: #2e2e2e;
  font-weight: 500;
  position: relative;
}

.custom-select-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23561c24' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform 0.3s ease;
  pointer-events: none;
}

/* Open state */
.custom-select.open {
  border-color: #561c24;
  box-shadow: 0 0 0 4px rgba(86, 28, 36, 0.1);
}

.custom-select.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

/* 🔥 Fullscreen Popup Dropdown */
.custom-options {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.9);
  width: 95%;
  max-width: 480px;
  max-height: 70vh;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(86, 28, 36, 0.15);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(86, 28, 36, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 9999;
  backdrop-filter: blur(10px);
  padding: 12px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Visible popup */
.custom-select.open .custom-options {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

/* Option styling */
.custom-option {
  display: inline-block;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 500;
  color: #2e2e2e;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
  text-align: center;
  border-radius: 9999px;
  margin: 6px;
  position: relative;
  overflow: hidden;
  border: 1px solid #561c24;
  min-width: 160px;
}

/* Hover effect */
.custom-option:hover {
  background: rgba(86, 28, 36, 0.1);
  color: #561c24;
}

/* ✅ Selected option (fully filled pill) */
.custom-option.selected {
  background: #561c24 !important;
  color: #fff !important;
  font-weight: 600;
  transform: scale(1.03);
  border-radius: 9999px !important;
  box-shadow: 0 0 0 0 #561c24 inset, inset 0 0 0 9999px #561c24;
}

/* Popup overlay background */
.custom-select-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.custom-select.open + .custom-select-backdrop {
  opacity: 1;
  pointer-events: all;
}

/* ---------- Buttons ---------- */
.wcrcf-actions {
  text-align: center;
  margin-top: 20px;
}

.wcrcf-button {
  background: linear-gradient(180deg, #561c24 0%, #3e1216 100%);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 8px 20px rgba(86, 28, 36, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wcrcf-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(86, 28, 36, 0.22);
}

/* ---------- MESSAGES (NEW DESIGN) ---------- */

.wcrcf-message {
    margin-top: 25px;
    padding: 16px 20px;
    border-radius: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    display: none; /* Hidden by default */
}

/* ✅ Error Style (Red - Like "Invalid Input") */
.wcrcf-message.error {
    background: #ffecec;
    color: #b00020;
    border: 1px solid #b0002030;
}

/* ✅ Success Style (Green - Like "Refunded Order") */
.wcrcf-message.success {
    background: #e9f9ef;
    color: #1c7c3a;
    border: 1px solid #1c7c3a30;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .wcrcf-form {
    padding: 22px;
  }

  .wcrcf-title {
    font-size: 20px;
  }

  .custom-select-trigger {
    padding: 12px 44px 12px 14px;
  }

  .custom-options {
    width: 92%;
    max-width: 400px;
  }
}

/* Loading overlay */
#page-loading {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.9);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
#page-loading .logo-wrapper {
  background: #fff;
  padding: 15px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
#page-loading img {
  width: 55px;
  height: auto;
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; }
}
.loading-dots {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.loading-dots div {
  width: 8px;
  height: 8px;
  background: #561c24;
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}
.loading-dots div:nth-child(2) { animation-delay: 0.2s; }
.loading-dots div:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  from { transform: translateY(0); opacity: 0.6; }
  to { transform: translateY(-6px); opacity: 1; }
}