/* =========================================================
   TouchTry Eye Fit - Scoped Styles
   ========================================================= */

/* ---------------- Admin Base ---------------- */
.toplevel_page_eyefit_dashboard .wrap,
.eyefit_dashboard_page_eyefit_product_sync .wrap,
.eyefit_dashboard_page_eyefit_pricing .wrap,
.eyefit_dashboard_page_eyefit_contact .wrap {
  font-family: Inter, "Segoe UI", sans-serif;
  color: #1f2937;
  max-width: 1100px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 10px;
  margin-top: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.toplevel_page_eyefit_dashboard .wrap h1,
.eyefit_dashboard_page_eyefit_product_sync .wrap h1,
.eyefit_dashboard_page_eyefit_pricing .wrap h1,
.eyefit_dashboard_page_eyefit_contact .wrap h1 {
  font-size: 26px;
  margin-bottom: 20px;
  color: #111827;
}

.toplevel_page_eyefit_dashboard .wrap h2,
.eyefit_dashboard_page_eyefit_product_sync .wrap h2,
.eyefit_dashboard_page_eyefit_pricing .wrap h2,
.eyefit_dashboard_page_eyefit_contact .wrap h2 {
  font-size: 20px;
  margin-top: 24px;
  margin-bottom: 10px;
  color: #111827;
}

.toplevel_page_eyefit_dashboard .wrap p,
.eyefit_dashboard_page_eyefit_product_sync .wrap p,
.eyefit_dashboard_page_eyefit_pricing .wrap p,
.eyefit_dashboard_page_eyefit_contact .wrap p {
  font-size: 16px;
  line-height: 1.7;
}

.toplevel_page_eyefit_dashboard .wrap ol,
.toplevel_page_eyefit_dashboard .wrap ul,
.eyefit_dashboard_page_eyefit_product_sync .wrap ol,
.eyefit_dashboard_page_eyefit_product_sync .wrap ul,
.eyefit_dashboard_page_eyefit_pricing .wrap ol,
.eyefit_dashboard_page_eyefit_pricing .wrap ul,
.eyefit_dashboard_page_eyefit_contact .wrap ol,
.eyefit_dashboard_page_eyefit_contact .wrap ul {
  font-size: 16px;
  line-height: 1.8;
  padding-left: 20px;
}

.toplevel_page_eyefit_dashboard .wrap a.button-primary,
.eyefit_dashboard_page_eyefit_product_sync .wrap a.button-primary,
.eyefit_dashboard_page_eyefit_pricing .wrap a.button-primary,
.eyefit_dashboard_page_eyefit_contact .wrap a.button-primary {
  background: #000;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
  margin-top: 15px;
  border: 0;
}

.toplevel_page_eyefit_dashboard .wrap a.button-primary:hover,
.eyefit_dashboard_page_eyefit_product_sync .wrap a.button-primary:hover,
.eyefit_dashboard_page_eyefit_pricing .wrap a.button-primary:hover,
.eyefit_dashboard_page_eyefit_contact .wrap a.button-primary:hover {
  background: #111;
}

.toplevel_page_eyefit_dashboard .wrap table.widefat,
.eyefit_dashboard_page_eyefit_product_sync .wrap table.widefat,
.eyefit_dashboard_page_eyefit_pricing .wrap table.widefat,
.eyefit_dashboard_page_eyefit_contact .wrap table.widefat {
  border: 1px solid #ddd;
}

.toplevel_page_eyefit_dashboard .wrap table.widefat th,
.toplevel_page_eyefit_dashboard .wrap table.widefat td,
.eyefit_dashboard_page_eyefit_product_sync .wrap table.widefat th,
.eyefit_dashboard_page_eyefit_product_sync .wrap table.widefat td,
.eyefit_dashboard_page_eyefit_pricing .wrap table.widefat th,
.eyefit_dashboard_page_eyefit_pricing .wrap table.widefat td,
.eyefit_dashboard_page_eyefit_contact .wrap table.widefat th,
.eyefit_dashboard_page_eyefit_contact .wrap table.widefat td {
  padding: 12px;
  text-align: left;
  font-size: 15px;
}

.toplevel_page_eyefit_dashboard .wrap table.widefat tr:nth-child(even),
.eyefit_dashboard_page_eyefit_product_sync .wrap table.widefat tr:nth-child(even),
.eyefit_dashboard_page_eyefit_pricing .wrap table.widefat tr:nth-child(even),
.eyefit_dashboard_page_eyefit_contact .wrap table.widefat tr:nth-child(even) {
  background-color: #f2f2f2;
}

/* ---------------- Product Sync ---------------- */
#eyefit-fetch-products-btn {
  min-width: 160px;
}

#eyefit-product-sync-table {
  margin-top: 16px;
  border-collapse: collapse;
  table-layout: fixed;
}

#eyefit-product-sync-table th {
  background: #111827;
  color: #fff;
  font-weight: 600;
}

#eyefit-product-sync-table td,
#eyefit-product-sync-table th {
  vertical-align: middle;
}

#eyefit-product-sync-table td:nth-child(1) {
  width: 24%;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

#eyefit-product-sync-table td:nth-child(2),
#eyefit-product-sync-table td:nth-child(3),
#eyefit-product-sync-table td:nth-child(4) {
  width: 12%;
}

#eyefit-product-sync-table td:nth-child(5) {
  width: 40%;
}

#eyefit-product-sync-table input[type="url"],
#eyefit-product-sync-table .regular-text {
  width: 100%;
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  box-sizing: border-box;
  background: #fff;
}

#eyefit-product-sync-table input[type="url"]:focus,
#eyefit-product-sync-table .regular-text:focus {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
  outline: none;
}

#eyefit-product-sync-table label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

#eyefit-product-sync-table input[type="checkbox"] {
  margin: 0;
}

.eyefit_dashboard_page_eyefit_product_sync .notice {
  margin-top: 16px;
}

.eyefit_dashboard_page_eyefit_product_sync .button.button-secondary,
.eyefit_dashboard_page_eyefit_product_sync .button.button-primary {
  border-radius: 6px;
}

.eyefit_dashboard_page_eyefit_product_sync form > p:last-child {
  margin-top: 18px;
}

/* ---------------- Pricing ---------------- */
.tt-eyewear-pricing-wrapper {
  width: 100%;
  padding: 30px 10px 10px;
  text-align: center;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f8fafc;
  box-sizing: border-box;
}

.tt-eyewear-pricing-wrapper h2 {
  font-size: 44px;
  margin: 0 0 25px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: #111827;
}

.tt-eyewear-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 28px;
  max-width: 1220px;
  margin: 0 auto;
  align-items: stretch;
}

.tt-eyewear-plan-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 26px 26px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 640px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tt-eyewear-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.tt-eyewear-plan-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: 2px;
  font-weight: 600;
  color: #1f2937;
}

.tt-eyewear-plan-card .desc {
  margin: 0 0 18px;
  color: #333;
  font-size: 14px;
  line-height: 1.45;
}

.tt-eyewear-plan-card .price {
  margin: 10px 0 18px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.tt-eyewear-plan-card .price .amount {
  font-size: 36px;
  color: #2f80ed;
}

.tt-eyewear-plan-card .price .duration {
  font-size: 26px;
  color: #2f80ed;
  font-weight: 800;
  white-space: nowrap;
}

.tt-eyewear-plan-card .price.contact-price {
  font-size: 32px;
  color: #2f80ed;
  font-weight: 900;
}

.tt-eyewear-plan-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  text-align: center;
}

.tt-eyewear-plan-card ul li {
  padding: 12px 0;
  font-size: 13px;
  color: #111;
  line-height: 1.5;
}

.tt-eyewear-plan-card .buy-btn,
.buy-btn {
  margin-top: auto;
  display: inline-block;
  background: #000;
  color: #fff !important;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  width: 70%;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}

.tt-eyewear-plan-card .buy-btn:hover,
.buy-btn:hover {
  opacity: 0.9;
}

.custom-plan-note {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #374151;
}

/* ---------------- Dashboard ---------------- */
.tt-eyewear-dashboard-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 20px 0;
}

.tt-eyewear-video {
  flex: 1;
  min-width: 300px;
  max-width: 480px;
}

.tt-eyewear-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: none;
}

.tt-eyewear-dashboard-content {
  flex: 2;
  min-width: 320px;
}

.tt-eyewear-dashboard-content h1 {
  font-size: 24px;
  margin-top: 0;
}

.tt-eyewear-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  background: #f1f5f9;
  padding: 30px;
  border-radius: 16px;
  margin-top: 30px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
  font-family: Inter, sans-serif;
}

.tt-eyewear-dashboard.single-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  margin-top: 30px;
}

.tt-eyewear-video-card,
.tt-eyewear-info-card {
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  flex: 1;
  min-width: 300px;
}

.tt-eyewear-video-card h2,
.tt-eyewear-info-card h2 {
  font-size: 20px;
  margin-bottom: 16px;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tt-eyewear-video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tt-eyewear-info-card p {
  font-size: 15px;
  color: #374151;
  margin-bottom: 16px;
}

.tt-eyewear-info-card ol {
  padding-left: 20px;
  color: #374151;
  font-size: 15px;
  line-height: 1.8;
  margin-top: 10px;
}

.tt-eyewear-info-card ol li {
  margin-bottom: 10px;
}

.tt-eyewear-info-card .demo-btn,
.info-box .demo-btn {
  display: inline-block;
  margin-top: 20px;
  background: #000;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.tt-eyewear-info-card .demo-btn:hover,
.info-box .demo-btn:hover {
  opacity: 0.9;
}

.tt-eyewear-card-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
}

.video-box {
  flex: 1;
  min-width: 320px;
}

.video-box iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.info-box {
  flex: 1;
  min-width: 320px;
  padding-left: 0;
  margin-left: 0;
  text-align: left;
}

.info-box h2 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #111827;
}

.info-box p {
  font-size: 15px;
  color: #374151;
  margin-bottom: 16px;
}

.info-box ol {
  padding-left: 20px;
  color: #374151;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 20px;
}

/* ---------------- Frontend Try-On Button ---------------- */
.eyefit-tryon-wrap {
  margin: 12px 0;
}

.eyefit-tryon-button,
.ttew-tryon-button {
  display: inline-block;
  padding: 12px 18px;
  margin-top: 15px;
  border-radius: 6px;
  background: #000;
  color: #fff !important;
  border: 1px solid #000;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.eyefit-tryon-button:hover,
.ttew-tryon-button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.eyefit-tryon-button:focus,
.ttew-tryon-button:focus {
  outline: 2px solid #111;
  outline-offset: 2px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .tt-eyewear-pricing-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 900px) {
  .eyefit_dashboard_page_eyefit_product_sync .wrap {
    overflow-x: auto;
  }

  #eyefit-product-sync-table {
    min-width: 820px;
  }
}

@media (max-width: 767px) {
  .tt-eyewear-dashboard,
  .tt-eyewear-dashboard-wrapper,
  .tt-eyewear-card-inner {
    gap: 20px;
  }

  .tt-eyewear-video,
  .tt-eyewear-dashboard-content,
  .tt-eyewear-video-card,
  .tt-eyewear-info-card,
  .video-box,
  .info-box {
    min-width: 100%;
  }
}

@media (max-width: 600px) {
  .tt-eyewear-pricing-wrapper h2 {
    font-size: 32px;
  }

  .tt-eyewear-pricing-grid {
    grid-template-columns: 1fr;
  }

  .tt-eyewear-plan-card {
    min-height: auto;
  }

  .eyefit-tryon-button,
  .ttew-tryon-button {
    width: 100%;
    box-sizing: border-box;
  }
}

.eyefit-product-thumb img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.eyefit-no-image {
  display: inline-block;
  min-width: 48px;
  padding: 8px;
  font-size: 11px;
  text-align: center;
  background: #f3f4f6;
  border-radius: 8px;
  color: #6b7280;
}

.eyefit-status-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.eyefit-status-enabled {
  background: #dcfce7;
  color: #166534;
}

.eyefit-status-disabled {
  background: #f3f4f6;
  color: #374151;
}

.eyefit-status-missing {
  background: #fef3c7;
  color: #92400e;
}

.eyefit-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin: 12px 0 16px;
}

.eyefit-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.eyefit-filter-form input[type="search"],
.eyefit-filter-form select {
  min-height: 36px;
}