/**
 * Easy Vendor Core — Public Styles
 * File: assets/css/ev-public.css
 */

/* ── Google Font ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ───────────────────────────────────────────── */
:root {
  --ev-primary:       #233C7E;
  --ev-primary-dark:  #162752;
  --ev-primary-light: #e9ecf5;
  --ev-success:       #16a34a;
  --ev-warning:       #d97706;
  --ev-danger:        #dc2626;
  --ev-text:          #1e293b;
  --ev-text-muted:    #64748b;
  --ev-border:        #e2e8f0;
  --ev-bg:            #f8fafc;
  --ev-card-bg:       #ffffff;
  --ev-radius:        12px;
  --ev-radius-sm:     8px;
  --ev-shadow:        0 2px 16px rgba(0,0,0,0.08);
  --ev-shadow-lg:     0 8px 32px rgba(0,0,0,0.12);
  --ev-transition:    0.2s ease;
  --ev-font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Base ────────────────────────────────────────────────────── */
.ev-wrap * { box-sizing: border-box; font-family: var(--ev-font); }
.ev-wrap { max-width: 1200px; margin: 0 auto; padding: 32px 20px; color: var(--ev-text); }

/* ── Buttons ─────────────────────────────────────────────────── */
.ev-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--ev-radius-sm);
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all var(--ev-transition);
  text-decoration: none;
}
.ev-btn--primary { background: var(--ev-primary); color: #fff; border-color: var(--ev-primary); }
.ev-btn--primary:hover { background: var(--ev-primary-dark); border-color: var(--ev-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(79,70,229,0.3); }
.ev-btn--outline { background: transparent; color: var(--ev-primary); border-color: var(--ev-primary); }
.ev-btn--outline:hover { background: var(--ev-primary-light); }
.ev-btn--large { padding: 16px 36px; font-size: 16px; }
.ev-btn--sm    { padding: 8px 16px; font-size: 13px; }

/* ── Forms ───────────────────────────────────────────────────── */
.ev-form-section {
  background: var(--ev-card-bg); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius); padding: 28px; margin-bottom: 24px;
  box-shadow: var(--ev-shadow);
}
.ev-section-title {
  font-size: 18px; font-weight: 700; color: var(--ev-text);
  margin: 0 0 20px; padding-bottom: 12px;
  border-bottom: 2px solid var(--ev-primary-light);
  display: flex; align-items: center; gap: 10px;
}
.ev-section-title i { color: var(--ev-primary); }

.ev-form-grid { display: grid; gap: 20px; }
.ev-grid-2 { grid-template-columns: repeat(2, 1fr); }

.ev-field { display: flex; flex-direction: column; gap: 6px; }
.ev-field label { font-size: 14px; font-weight: 600; color: var(--ev-text); }
.ev-req { color: var(--ev-danger); }
.ev-optional { color: var(--ev-text-muted); font-weight: 400; font-size: 12px; }
.ev-field-hint { font-size: 13px; color: var(--ev-text-muted); margin: 0 0 12px; }

.ev-field input[type="text"],
.ev-field input[type="tel"],
.ev-field input[type="email"],
.ev-field input[type="password"],
.ev-field input[type="number"],
.ev-field select,
.ev-field textarea {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--ev-border); border-radius: var(--ev-radius-sm);
  font-size: 15px; color: var(--ev-text);
  background: #fff; transition: border-color var(--ev-transition);
  font-family: var(--ev-font);
}
.ev-field input:focus,
.ev-field select:focus,
.ev-field textarea:focus {
  border-color: var(--ev-primary); outline: none;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.ev-field select { cursor: pointer; }
.ev-field textarea { resize: vertical; }

/* ── Category Grid ───────────────────────────────────────────── */
.ev-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.ev-category-card input { display: none; }
.ev-category-card__inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 16px 12px;
  border: 2px solid var(--ev-border); border-radius: var(--ev-radius-sm);
  cursor: pointer; transition: all var(--ev-transition);
  text-align: center; background: #fff;
}
.ev-category-card__inner i { font-size: 24px; color: var(--ev-primary); }
.ev-category-card__inner span { font-size: 13px; font-weight: 500; color: var(--ev-text); }
.ev-category-card:hover .ev-category-card__inner,
.ev-category-card.is-selected .ev-category-card__inner,
.ev-category-card input:checked + .ev-category-card__inner {
  border-color: var(--ev-primary); background: var(--ev-primary-light);
  box-shadow: 0 0 0 2px rgba(79,70,229,0.2);
}

/* ── Area Chips ──────────────────────────────────────────────── */
.ev-area-select { display: flex; flex-wrap: wrap; gap: 10px; }
.ev-area-chip input { display: none; }
.ev-area-chip {
  padding: 8px 16px; border: 2px solid var(--ev-border);
  border-radius: 999px; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all var(--ev-transition);
  background: #fff; color: var(--ev-text);
}
.ev-area-chip:hover,
.ev-area-chip.is-selected,
.ev-area-chip input:checked + * { background: var(--ev-primary); color: #fff; border-color: var(--ev-primary); }

/* ── File Upload ─────────────────────────────────────────────── */
.ev-upload-area {
  border: 2px dashed var(--ev-border); border-radius: var(--ev-radius-sm);
  padding: 20px; text-align: center; cursor: pointer;
  transition: all var(--ev-transition); background: var(--ev-bg);
  position: relative; overflow: hidden;
}
.ev-upload-area:hover { border-color: var(--ev-primary); background: var(--ev-primary-light); }
.ev-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.ev-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.ev-upload-placeholder i { font-size: 28px; color: var(--ev-text-muted); }
.ev-upload-placeholder span { font-size: 13px; color: var(--ev-text-muted); }
#ev-photo-preview { max-width: 120px; max-height: 120px; border-radius: 50%; object-fit: cover; margin: 8px auto; }

/* ── Password Input ──────────────────────────────────────────── */
.ev-password-wrap { position: relative; }
.ev-password-wrap input { padding-right: 48px; }
.ev-toggle-pass {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--ev-text-muted);
  font-size: 16px; padding: 4px;
}

/* ── Notices ─────────────────────────────────────────────────── */
.ev-notice {
  padding: 14px 20px; border-radius: var(--ev-radius-sm);
  margin-bottom: 20px; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.ev-notice--success { background: #f0fdf4; border-left: 4px solid var(--ev-success); color: #166534; }
.ev-notice--error   { background: #fef2f2; border-left: 4px solid var(--ev-danger);  color: #991b1b; }
.ev-notice--warning { background: #fffbeb; border-left: 4px solid var(--ev-warning); color: #92400e; }

/* ── Badges ──────────────────────────────────────────────────── */
.ev-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.ev-badge--success { background: #dcfce7; color: #166534; }
.ev-badge--warning { background: #fef3c7; color: #92400e; }
.ev-badge--danger  { background: #fee2e2; color: #991b1b; }

/* ── Stars ───────────────────────────────────────────────────── */
.ev-stars { display: inline-flex; gap: 2px; }
.ev-star--full  { color: #FADC06; }
.ev-star--half  { color: #FADC06; }
.ev-star--empty { color: #d1d5db; }

/* ─── Star Rating Input (Review Form) ──────────────────────── */
.ev-star-rating { display: flex; flex-direction: row-reverse; gap: 4px; }
.ev-star-rating input { display: none; }
.ev-star-rating label { font-size: 28px; color: #d1d5db; cursor: pointer; transition: color var(--ev-transition); }
.ev-star-rating input:checked ~ label,
.ev-star-rating label:hover,
.ev-star-rating label:hover ~ label { color: #FADC06; }

/* ── Vendor Directory ────────────────────────────────────────── */
.ev-search-bar {
  background: var(--ev-card-bg); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius); padding: 24px; margin-bottom: 32px;
  box-shadow: var(--ev-shadow);
}
.ev-search-bar__inner { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.ev-search-field { flex: 1; min-width: 160px; position: relative; }
.ev-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ev-text-muted); pointer-events: none; }
.ev-select {
  width: 100%; padding: 12px 16px 12px 40px;
  border: 2px solid var(--ev-border); border-radius: var(--ev-radius-sm);
  font-size: 15px; background: #fff; cursor: pointer;
  transition: border-color var(--ev-transition);
  font-family: var(--ev-font);
}
.ev-select:focus { border-color: var(--ev-primary); outline: none; }

.ev-vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.ev-vendor-card {
  background: var(--ev-card-bg); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius); overflow: hidden;
  box-shadow: var(--ev-shadow); transition: all var(--ev-transition);
}
.ev-vendor-card:hover { transform: translateY(-4px); box-shadow: var(--ev-shadow-lg); }
.ev-vendor-card__link { text-decoration: none; color: inherit; }
.ev-vendor-card__photo-wrap {
  position: relative;
  background: var(--ev-primary-light);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--ev-border);
}
.ev-vendor-card__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform var(--ev-transition);
}
.ev-vendor-card:hover .ev-vendor-card__photo {
  transform: scale(1.05);
}
.ev-vendor-card__category-badge {
  position: absolute; bottom: 10px; left: 10px;
  background: var(--ev-primary); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.ev-vendor-card__body { padding: 16px; }
.ev-vendor-card__name { font-size: 17px; font-weight: 700; margin: 0 0 8px; color: var(--ev-text); }
.ev-vendor-card__rating { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.ev-rating-num { font-weight: 700; font-size: 14px; }
.ev-rating-total { font-size: 13px; color: var(--ev-text-muted); }
.ev-vendor-card__areas { font-size: 13px; color: var(--ev-text-muted); margin-bottom: 8px; }
.ev-vendor-card__hours { font-size: 13px; color: var(--ev-text-muted); margin: 0; }
.ev-vendor-card__footer {
  padding: 12px 16px; border-top: 1px solid var(--ev-border);
  display: flex; gap: 10px; justify-content: space-between;
}

/* ── Contact Reveal on Listing Card ───────────────────────────── */
.ev-card-contact-reveal {
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--ev-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: evFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.ev-card-contact-reveal a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ev-text);
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-sm);
  transition: all var(--ev-transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.ev-card-contact-reveal a:hover {
  border-color: var(--ev-primary);
  background: var(--ev-primary-light);
  color: var(--ev-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(35, 60, 126, 0.08);
}
.ev-card-contact-reveal i {
  font-size: 14px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--ev-transition);
}
.ev-card-contact-reveal .fa-phone {
  background: #eafaf1;
  color: #16a34a;
}
.ev-card-contact-reveal .fa-whatsapp {
  background: #e6fcf5;
  color: #25d366;
}
.ev-card-contact-reveal a.ev-whatsapp-color:hover {
  border-color: #25d366;
  background: #eafaf1;
  color: #128c7e;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.08);
}
.ev-card-contact-reveal .fa-envelope {
  background: var(--ev-primary-light);
  color: var(--ev-primary);
}

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

/* ── Single Vendor Profile ───────────────────────────────────── */
.ev-profile-header {
  display: flex; gap: 32px; align-items: flex-start;
  background: var(--ev-card-bg); border-radius: var(--ev-radius);
  padding: 32px; margin-bottom: 28px; box-shadow: var(--ev-shadow);
  flex-wrap: wrap;
}
.ev-vendor-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 4px solid var(--ev-primary-light); }
.ev-profile-name { font-size: 28px; font-weight: 800; margin: 0 0 8px; }
.ev-profile-category { font-size: 16px; color: var(--ev-primary); font-weight: 600; margin: 0 0 10px; }
.ev-profile-areas { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.ev-area-tag { padding: 4px 12px; background: var(--ev-primary-light); color: var(--ev-primary); border-radius: 999px; font-size: 13px; font-weight: 500; }
.ev-verified-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; background: #dcfce7; color: #166534; border-radius: 999px; font-size: 12px; font-weight: 600; margin-top: 8px; }

.ev-profile-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 40px; }
.ev-card { background: var(--ev-card-bg); border: 1px solid var(--ev-border); border-radius: var(--ev-radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--ev-shadow); }
.ev-card-title { font-size: 18px; font-weight: 700; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.ev-card-title i { color: var(--ev-primary); }

.ev-contact-card { border: 2px solid var(--ev-primary-light); }
.ev-contact-hint { font-size: 14px; color: var(--ev-text-muted); margin-bottom: 20px; }
.ev-contact-details { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.ev-contact-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  background: var(--ev-bg); border-radius: var(--ev-radius-sm);
  text-decoration: none; color: var(--ev-text); font-weight: 600; font-size: 16px;
  border: 1px solid var(--ev-border); transition: all var(--ev-transition);
}
.ev-contact-item:hover { background: var(--ev-primary-light); border-color: var(--ev-primary); }
.ev-contact-item i { font-size: 20px; }
.ev-contact-mobile  i { color: #16a34a; }
.ev-contact-whatsapp i { color: #25d366; }
.ev-contact-email i { color: var(--ev-primary); }

.ev-quick-stats ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ev-quick-stats li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.ev-quick-stats i { color: var(--ev-primary); width: 20px; text-align: center; }

/* ── Reviews ─────────────────────────────────────────────────── */
.ev-reviews-section, .ev-review-form-section { margin-top: 40px; }
.ev-section-heading { font-size: 22px; font-weight: 800; margin-bottom: 24px; display: flex; align-items: center; gap: 12px; }
.ev-section-heading i { color: var(--ev-primary); }
.ev-reviews-list { display: flex; flex-direction: column; gap: 16px; }
.ev-review-card { background: var(--ev-card-bg); border: 1px solid var(--ev-border); border-radius: var(--ev-radius); padding: 20px; }
.ev-review-header { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.ev-reviewer-name { font-weight: 700; font-size: 15px; }
.ev-review-date { font-size: 12px; color: var(--ev-text-muted); margin-left: auto; }
.ev-review-text { font-size: 15px; color: var(--ev-text-muted); margin: 0; line-height: 1.6; }
.ev-no-reviews { color: var(--ev-text-muted); font-style: italic; }

/* ── Registration specific ───────────────────────────────────── */
.ev-reg-header { text-align: center; margin-bottom: 36px; }
.ev-reg-title { font-size: 32px; font-weight: 800; color: var(--ev-text); margin: 0 0 8px; }
.ev-reg-subtitle { font-size: 16px; color: var(--ev-text-muted); margin: 0; }
.ev-form-footer { text-align: center; padding: 24px; }
.ev-terms-notice { font-size: 13px; color: var(--ev-text-muted); margin-bottom: 20px; }

/* ── Dashboard specific ──────────────────────────────────────── */
.ev-dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--ev-primary), var(--ev-primary-dark));
  border-radius: var(--ev-radius); padding: 28px 32px; margin-bottom: 24px;
  color: #fff; flex-wrap: wrap; gap: 16px;
}
.ev-dashboard-header__info { display: flex; align-items: center; gap: 20px; }
.ev-dashboard-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.4); }
.ev-dashboard-name { font-size: 22px; font-weight: 800; margin: 0 0 8px; color: #fff; }
.ev-dashboard-hint { font-size: 13px; color: rgba(255,255,255,0.8); margin: 6px 0 0; }

.ev-subscription-panel {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  background: var(--ev-card-bg); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius); padding: 20px 28px; margin-bottom: 24px;
  box-shadow: var(--ev-shadow);
}
.ev-subscription-panel__info { display: flex; flex-direction: column; gap: 4px; }
.ev-sub-label { font-size: 12px; color: var(--ev-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.ev-sub-plan { font-size: 18px; font-weight: 700; color: var(--ev-primary); }

.ev-current-photo { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; margin-bottom: 8px; }
.ev-doc-status { font-size: 13px; margin: 4px 0; }
.ev-doc-uploaded { color: var(--ev-success); }

/* ── No Results ──────────────────────────────────────────────── */
.ev-no-vendors {
  grid-column: 1 / -1; text-align: center; padding: 80px 20px;
  color: var(--ev-text-muted);
}
.ev-no-vendors i { font-size: 48px; display: block; margin-bottom: 16px; }
.ev-results-info { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; color: var(--ev-text-muted); font-size: 14px; }
.ev-spinner { display: flex; align-items: center; gap: 8px; color: var(--ev-primary); font-weight: 600; }

/* ── Review Form ─────────────────────────────────────────────── */
.ev-review-form-wrap {
  background: var(--ev-card-bg); border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius); padding: 32px; box-shadow: var(--ev-shadow);
}
.ev-review-disclaimer { font-size: 13px; color: var(--ev-text-muted); margin: 16px 0; padding: 12px; background: var(--ev-bg); border-radius: var(--ev-radius-sm); }
.ev-review-notice { font-size: 14px; color: var(--ev-text-muted); margin-bottom: 20px; }
.ev-card-contact-reveal {
  padding: 16px; border-top: 1px solid var(--ev-border);
  background: var(--ev-primary-light);
}

/* ── View Only State ─────────────────────────────────────────── */
#ev-profile-form.is-view-only .ev-category-card,
#ev-profile-form.is-view-only .ev-area-chip {
  pointer-events: none;
}
#ev-profile-form.is-view-only .ev-category-card input:not(:checked) + .ev-category-card__inner,
#ev-profile-form.is-view-only .ev-area-chip input:not(:checked) + * {
  opacity: 0.55;
  background: #f8fafc;
  border-color: #e2e8f0;
}
#ev-profile-form.is-view-only .ev-category-card input:checked + .ev-category-card__inner {
  background: var(--ev-primary-light);
  border-color: var(--ev-primary);
  box-shadow: none;
}
#ev-profile-form.is-view-only .ev-upload-label,
#ev-profile-form.is-view-only input[type="file"],
#ev-profile-form.is-view-only .ev-field-hint,
#ev-profile-form.is-view-only .ev-form-footer {
  display: none !important;
}

.ev-field input:disabled,
.ev-field select:disabled,
.ev-field textarea:disabled {
  background-color: #f8fafc !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
  cursor: not-allowed;
  opacity: 0.9;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media ( max-width: 768px ) {
  .ev-grid-2 { grid-template-columns: 1fr; }
  .ev-profile-grid { grid-template-columns: 1fr; }
  .ev-profile-header { flex-direction: column; align-items: center; text-align: center; }
  .ev-search-bar__inner { flex-direction: column; }
  .ev-search-field { min-width: 100%; }
  .ev-subscription-panel { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; }
  .ev-subscription-panel__actions { margin-left: 0 !important; width: 100%; justify-content: stretch; display: flex; gap: 10px; }
  .ev-subscription-panel__actions .ev-btn { flex: 1; text-align: center; justify-content: center; }
  .ev-category-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .ev-dashboard-header { flex-direction: column; text-align: center; padding: 20px; }
  .ev-dashboard-header__info { flex-direction: column; text-align: center; gap: 12px; }
}
@media ( max-width: 480px ) {
  .ev-category-grid { grid-template-columns: repeat(2, 1fr); }
  .ev-vendor-grid { grid-template-columns: 1fr; }
  .ev-wrap { padding: 16px 12px; }
  .ev-form-section { padding: 20px 16px; }
  .ev-dashboard-name { font-size: 18px; }
  .ev-sub-plan { font-size: 16px; }
  .ev-section-title { font-size: 16px; }
}
