/* =========================================================
   TouchTry Watch Try-On - Admin Styles
   ========================================================= */

/* Main container */
.ttwt-container {
  padding: 40px 24px;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: linear-gradient(to right, #f9fafb, #eef2f7);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
  color: #1f2937;
  max-width: 1400px;
  margin: 30px auto;
  text-align: center;
  box-sizing: border-box;
}

/* Main heading */
.ttwt-container h1 {
  margin-bottom: 16px;
  font-size: 38px;
  font-weight: 700;
  color: #111827;
}

/* Subtitle */
.ttwt-container > p {
  font-size: 18px;
  color: #4b5563;
  max-width: 800px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

/* ---------------- Product Sync ---------------- */
.ttwt-product-sync-wrap {
  max-width: 1280px;
}

.ttwt-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ttwt-filter-form input[type="search"],
.ttwt-filter-form select {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
}

.ttwt-filter-form input[type="search"]:focus,
.ttwt-filter-form select:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
}

#ttwt-product-sync-table {
  margin-top: 16px;
  border-collapse: collapse;
  table-layout: fixed;
}

#ttwt-product-sync-table th {
  background: #111827;
  color: #ffffff;
  font-weight: 600;
}

#ttwt-product-sync-table td,
#ttwt-product-sync-table th {
  vertical-align: middle;
  padding: 12px;
}

#ttwt-product-sync-table td:nth-child(1) {
  width: 72px;
}

#ttwt-product-sync-table td:nth-child(2) {
  width: 22%;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

#ttwt-product-sync-table td:nth-child(3),
#ttwt-product-sync-table td:nth-child(4) {
  width: 10%;
}

#ttwt-product-sync-table td:nth-child(5) {
  width: 12%;
}

#ttwt-product-sync-table td:nth-child(6) {
  width: 12%;
}

#ttwt-product-sync-table td:nth-child(7) {
  width: 34%;
}

#ttwt-product-sync-table input[type="url"],
#ttwt-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: #ffffff;
}

#ttwt-product-sync-table input[type="url"]:focus,
#ttwt-product-sync-table .regular-text:focus {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
  outline: none;
}

#ttwt-product-sync-table label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

#ttwt-product-sync-table input[type="checkbox"] {
  margin: 0;
}

.ttwt-product-thumb img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: block;
}

.ttwt-no-image {
  display: inline-block;
  min-width: 48px;
  padding: 8px;
  font-size: 11px;
  text-align: center;
  background: #f3f4f6;
  border-radius: 8px;
  color: #6b7280;
}

.ttwt-status-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.ttwt-status-enabled {
  background: #dcfce7;
  color: #166534;
}

.ttwt-status-disabled {
  background: #f3f4f6;
  color: #374151;
}

.ttwt-status-missing {
  background: #fef3c7;
  color: #92400e;
}

.ttwt-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin: 12px 0 16px;
}

.ttwt-product-sync-wrap .notice {
  margin-top: 16px;
}

/* ---------------- Pricing ---------------- */
.ttwt-pricing-cards {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.ttwt-plan {
  flex: 1 1 250px;
  max-width: 270px;
  min-height: 310px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 30px 24px;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease-in-out;
  text-align: center;
  box-sizing: border-box;
}

.ttwt-plan:hover {
  transform: translateY(-4px);
}

.ttwt-plan h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #111827;
  text-align: center;
}

.ttwt-plan p {
  font-size: 18px;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 16px;
  text-align: center;
  line-height: 1.6;
}

.ttwt-plan ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 20px;
}

.ttwt-plan ul li {
  margin-bottom: 10px;
  font-size: 15.5px;
  color: #374151;
  line-height: 1.5;
}

.ttwt-plan button,
.ttwt-plan .ttwt-button-dark,
.ttwt-plan a.ttwt-button-dark {
  background: #111827;
  color: #ffffff;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.ttwt-plan button:hover,
.ttwt-plan .ttwt-button-dark:hover,
.ttwt-plan a.ttwt-button-dark:hover {
  background: #000000;
}

.ttwt-plan button:disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

/* Backward compatibility if current markup still uses .plan */
.plan {
  flex: 1 1 250px;
  max-width: 270px;
  min-height: 310px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 30px 24px;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease-in-out;
  text-align: center;
  box-sizing: border-box;
}

.plan:hover {
  transform: translateY(-4px);
}

.plan h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #111827;
  text-align: center;
}

.plan p {
  font-size: 18px;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 16px;
  text-align: center;
}

.plan ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.plan ul li {
  margin-bottom: 10px;
  font-size: 15.5px;
  color: #374151;
  line-height: 1.5;
}

.plan button {
  background: #111827;
  color: #ffffff;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.plan button:hover {
  background: #000000;
}

.plan button:disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

/* ---------------- Contact ---------------- */
.ttwt-contact-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding: 40px 20px;
  margin-top: 40px;
  text-align: left;
}

.ttwt-contact-box img {
  display: block;
  max-width: 360px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.ttwt-contact-text {
  min-width: 280px;
  max-width: 420px;
  color: #374151;
}

.ttwt-contact-text p {
  margin: 14px 0;
  font-size: 18px;
  line-height: 1.7;
}

.ttwt-contact-text a {
  color: #6366f1;
  text-decoration: underline;
  font-weight: 500;
}

/* Backward compatibility for older nested div markup */
.ttwt-contact-box div {
  font-size: 17px;
  line-height: 1.8;
  color: #374151;
  max-width: 400px;
}

.ttwt-contact-box div p {
  margin-bottom: 12px;
}

.ttwt-contact-box div a {
  color: #6366f1;
  text-decoration: underline;
  font-weight: 500;
}

/* ---------------- Dashboard / Video Layout Fix ---------------- */

/* Main dashboard two-column row */
.ttwt-dashboard-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 60px !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 1280px !important;
  margin: 40px auto !important;
  box-sizing: border-box !important;
  text-align: left !important;
}

/* Left video column */
.ttwt-dashboard-media {
  flex: 0 0 560px !important;
  width: 560px !important;
  max-width: 560px !important;
  min-width: 500px !important;
  box-sizing: border-box !important;
}

/* Video iframe */
.ttwt-dashboard-media iframe,
.ttwt-container iframe {
  width: 100% !important;
  max-width: 560px !important;
  height: 315px !important;
  display: block !important;
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

/* Right text column */
.ttwt-feature-list {
  flex: 1 1 420px !important;
  max-width: 520px !important;
  min-width: 360px !important;
  font-size: 17px;
  line-height: 1.7;
  color: #374151;
  text-align: left !important;
  box-sizing: border-box !important;
}

.ttwt-feature-list h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 18px;
  color: #111827;
  text-align: left !important;
}

.ttwt-feature-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 22px;
}

.ttwt-feature-list ul li {
  margin-bottom: 13px;
  line-height: 1.7;
}

/* Fallback: if dashboard row class is missing, still force video + text side by side */
.ttwt-container > div:has(.ttwt-dashboard-media),
.ttwt-container > div:has(.ttwt-feature-list) {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 60px !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 1280px !important;
  margin: 40px auto !important;
  box-sizing: border-box !important;
}

/* ---------------- Button ---------------- */
.ttwt-button-dark {
  background: #111827;
  color: #ffffff;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  transition: 0.2s ease-in-out;
  display: inline-block;
}

.ttwt-button-dark:hover {
  background: #000000;
  color: #ffffff;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1200px) {
  .ttwt-dashboard-row,
  .ttwt-container > div:has(.ttwt-dashboard-media),
  .ttwt-container > div:has(.ttwt-feature-list) {
    gap: 40px !important;
  }

  .ttwt-dashboard-media {
    flex: 0 0 520px !important;
    width: 520px !important;
    max-width: 520px !important;
    min-width: 480px !important;
  }

  .ttwt-dashboard-media iframe,
  .ttwt-container iframe {
    max-width: 520px !important;
    height: 293px !important;
  }

  .ttwt-feature-list {
    min-width: 330px !important;
  }
}

@media (max-width: 1024px) {
  .ttwt-pricing-cards {
    justify-content: center;
  }

  .ttwt-plan,
  .plan {
    max-width: 100%;
  }

  .ttwt-dashboard-row,
  .ttwt-container > div:has(.ttwt-dashboard-media),
  .ttwt-container > div:has(.ttwt-feature-list) {
    gap: 28px !important;
  }

  .ttwt-dashboard-media {
    flex: 0 0 480px !important;
    width: 480px !important;
    max-width: 480px !important;
    min-width: 440px !important;
  }

  .ttwt-dashboard-media iframe,
  .ttwt-container iframe {
    max-width: 480px !important;
    height: 270px !important;
  }

  .ttwt-feature-list {
    min-width: 300px !important;
    max-width: 460px !important;
  }
}

@media (max-width: 900px) {
  .ttwt-product-sync-wrap {
    overflow-x: auto;
  }

  #ttwt-product-sync-table {
    min-width: 920px;
  }

  .ttwt-dashboard-row,
  .ttwt-container > div:has(.ttwt-dashboard-media),
  .ttwt-container > div:has(.ttwt-feature-list) {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    gap: 30px !important;
    text-align: center !important;
  }

  .ttwt-dashboard-media {
    flex: unset !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .ttwt-dashboard-media iframe,
  .ttwt-container iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: 260px !important;
  }

  .ttwt-feature-list {
    flex: unset !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
  }

  .ttwt-feature-list h2 {
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  .ttwt-container {
    padding: 28px 16px;
  }

  .ttwt-container h1 {
    font-size: 30px;
  }

  .ttwt-container > p {
    font-size: 16px;
  }

  .ttwt-contact-box {
    gap: 24px;
    text-align: center;
  }

  .ttwt-contact-text {
    min-width: 100%;
    max-width: 100%;
  }

  .ttwt-feature-list {
    text-align: center !important;
  }

  .ttwt-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .ttwt-filter-form input[type="search"],
  .ttwt-filter-form select,
  .ttwt-filter-form .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .ttwt-dashboard-media iframe,
  .ttwt-container iframe {
    height: 220px !important;
  }

  .ttwt-feature-list h2 {
    font-size: 24px;
  }

  .ttwt-feature-list {
    font-size: 16px;
  }
}