/*
 * ============================================================
 * YAHYA AGRICOLA — Booking Form Styles
 * Developer: Mohammed Imran, Softomatic BD Limited
 * ============================================================
 */

/* ── Order Contact Cards (used in booking-section.php) ───── */
.order-contact-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.order-contact-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
  color: var(--text-primary);
}

.order-contact-card:hover {
  border-color: var(--border-gold);
  transform: translateX(5px);
  box-shadow: var(--shadow-gold);
  color: var(--text-primary);
}

.order-contact-card .card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.card-icon.phone-icon { background: rgba(74,140,79,0.15);  color: var(--green-light); border: 1px solid rgba(74,140,79,0.3); }
.card-icon.wa-icon    { background: rgba(37,211,102,0.12); color: #25D366;             border: 1px solid rgba(37,211,102,0.3); }
.card-icon.email-icon { background: rgba(201,168,76,0.12); color: var(--gold);          border: 1px solid var(--border-gold); }

.order-contact-card:hover .card-icon { transform: scale(1.1); }

.card-info .card-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.card-info .card-value {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--text-primary);
  display: block;
}

.card-arrow {
  margin-left: auto;
  color: var(--gold);
  font-size: 1rem;
  opacity: 0;
  transform: translateX(-5px);
  transition: all var(--transition-base);
}

.order-contact-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Section ──────────────────────────────────────────────── */
.booking-section {
  background: var(--bg-primary);
  padding: var(--space-20) 0;
  position: relative;
  overflow: hidden;
}

.booking-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(201,168,76,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 50%, rgba(74,140,79,0.05) 0%, transparent 55%);
  pointer-events: none;
}

/* ── 2-col layout ─────────────────────────────────────────── */
.booking-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-16);
  align-items: start;
  position: relative;
  z-index: 1;
}

/* ── Left — contact cards ─────────────────────────────────── */
.booking-left .eyebrow {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--space-3);
}

.booking-left h2 { margin-bottom: var(--space-4); }

.booking-left .booking-sub {
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  line-height: 1.8;
}

/* ── Right — form wrap ────────────────────────────────────── */
.booking-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-gold);
}

/* ── Booking type tabs ────────────────────────────────────── */
.booking-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.booking-tab {
  padding: 0.7rem var(--space-4);
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Hind Siliguri', sans-serif;
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--text-muted);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.booking-tab.active {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.booking-tab.active.urgent {
  color: #f97316;
  border: 1px solid rgba(249,115,22,0.3);
}

.booking-tab.active.advance {
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.booking-tab:not(.active):hover {
  color: var(--text-primary);
}

/* Urgent glow */
.booking-form-wrap.is-urgent {
  border-color: rgba(249,115,22,0.4);
  box-shadow: 0 4px 30px rgba(249,115,22,0.12);
}

/* ── Form fields ──────────────────────────────────────────── */
.bform-group {
  margin-bottom: var(--space-4);
}

.bform-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  font-family: 'Hind Siliguri', sans-serif;
}

.bform-group label .req {
  color: #f87171;
  margin-left: 3px;
}

.bform-group input,
.bform-group select,
.bform-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: 'Hind Siliguri', sans-serif;
  transition: all var(--transition-fast);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.bform-group input::placeholder,
.bform-group textarea::placeholder {
  color: var(--text-muted);
}

.bform-group input:focus,
.bform-group select:focus,
.bform-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
  background: var(--bg-card);
}

.bform-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A84C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.bform-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.bform-group textarea {
  resize: vertical;
  min-height: 90px;
}

/* ── 2-col row ────────────────────────────────────────────── */
.bform-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* ── Conditional fields ───────────────────────────────────── */
.bform-conditional {
  display: none;
}
.bform-conditional.visible {
  display: block;
}

/* ── Custom cattle dropdown ───────────────────────────────── */
.cattle-picker {
  position: relative;
}

.cattle-picker-trigger {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: 'Hind Siliguri', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: all var(--transition-fast);
  text-align: left;
}

.cattle-picker-trigger:hover,
.cattle-picker.open .cattle-picker-trigger {
  border-color: var(--gold);
  background: var(--bg-card);
}

.cattle-picker-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border);
}

.cattle-picker-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.cattle-picker-info {
  flex: 1;
  min-width: 0;
}

.cattle-picker-name {
  font-weight: var(--weight-semi);
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--text-sm);
}

.cattle-picker-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.cattle-picker-chevron {
  color: var(--gold);
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.cattle-picker.open .cattle-picker-chevron {
  transform: rotate(180deg);
}

/* Dropdown panel */
.cattle-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  overflow: hidden;
  display: none;
  max-height: 320px;
  flex-direction: column;
}

.cattle-picker.open .cattle-picker-dropdown {
  display: flex;
}

/* Search inside dropdown */
.cattle-search-wrap {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cattle-search-input {
  width: 100%;
  padding: 0.5rem 0.85rem 0.5rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: 'Hind Siliguri', sans-serif;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A89F91' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.6rem center;
}

.cattle-search-input:focus {
  border-color: var(--gold);
}

/* Dropdown list */
.cattle-dropdown-list {
  overflow-y: auto;
  flex: 1;
}

/* Each option */
.cattle-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-subtle);
}

.cattle-option:last-child { border-bottom: none; }

.cattle-option:hover {
  background: var(--bg-secondary);
}

.cattle-option.selected {
  background: var(--badge-bg);
}

.cattle-option-img {
  width: 48px;
  height: 42px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.cattle-option-img.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
}

.cattle-option-body { flex: 1; min-width: 0; }

.cattle-option-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cattle-option-details {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-2);
  margin-top: 2px;
  flex-wrap: wrap;
}

.cattle-option-price {
  font-family: var(--font-accent);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cattle-option-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  margin-top: 2px;
}

/* No-preference option */
.cattle-option.any-option {
  border-bottom: 2px solid var(--border);
  font-style: italic;
}

/* ── Submit button ─────────────────────────────────────────── */
.booking-submit {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  font-family: 'Hind Siliguri', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  margin-top: var(--space-5);
  position: relative;
  overflow: hidden;
}

.booking-submit.urgent-btn {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  box-shadow: 0 4px 20px rgba(249,115,22,0.3);
}

.booking-submit.advance-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0D1F0F;
  box-shadow: var(--shadow-gold);
}

.booking-submit:hover {
  transform: translateY(-2px);
}

.booking-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Success message ──────────────────────────────────────── */
.booking-success {
  display: none;
  text-align: center;
  padding: var(--space-8);
}

.booking-success.show { display: block; }

.booking-success .success-icon {
  width: 64px;
  height: 64px;
  background: rgba(74,222,128,0.15);
  border: 2px solid rgba(74,222,128,0.4);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  font-size: 1.6rem;
  color: #4ade80;
}

.booking-success h4 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.booking-success .booking-id-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: var(--badge-bg);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  font-family: var(--font-accent);
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 2px;
  margin: var(--space-3) 0;
}

.booking-success p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-5);
}

/* ── Error message ────────────────────────────────────────── */
.bform-error-box {
  display: none;
  padding: var(--space-3) var(--space-4);
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius-md);
  color: #f87171;
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.bform-error-box.show { display: block; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .booking-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .bform-row { grid-template-columns: 1fr; }
  .booking-form-wrap { padding: var(--space-5); }
}
