/* public-smd/css/savemysidate.css */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #172033;
}


.smd-language-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  width: min(1100px, calc(100% - 32px));
  margin: 18px auto 0;
}

.smd-language-bar label {
  font-size: 0.9rem;
  font-weight: 700;
}

.smd-language-bar select {
  min-width: 150px;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 0.65rem;
  background: #ffffff;
}

html[dir="rtl"] .smd-response-table th,
html[dir="rtl"] .smd-response-table td {
  text-align: right;
}


.smd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 24px 40px;
  background: #ffffff;
  border-bottom: 1px solid #dde3ee;
}

.smd-header h1 {
  margin: 0;
  font-size: 28px;
}

.smd-header p {
  margin: 6px 0 0;
  color: #64748b;
}

.smd-page {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .smd-page {
    grid-template-columns: 1fr 1fr;
  }

  .smd-login-card {
    grid-column: 1 / -1;
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
  }
}

.smd-card {
  background: #ffffff;
  border: 1px solid #dde3ee;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.smd-card h2,
.smd-card h1 {
  margin-top: 0;
}

.smd-muted {
  color: #64748b;
}

.smd-form {
  display: grid;
  gap: 12px;
}

.smd-form label {
  font-weight: 700;
  margin-top: 8px;
}

.smd-form input,
.smd-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 16px;
}

.smd-form button,
.smd-secondary-btn {
  margin-top: 18px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.smd-form button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.smd-secondary-btn {
  margin-top: 0;
  background: #334155;
}

.smd-message {
  min-height: 20px;
  color: #b91c1c;
  font-weight: 700;
}

.smd-fixed-label {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

.smd-preview-frame-wrap {
  width: 100%;
  border-radius: 18px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
  background: #ffffff;
}

.smd-preview-frame {
  width: 100%;
  height: 620px;
  border: 0;
  display: block;
  background: #ffffff;
}

.smd-debug {
  margin-top: 20px;
  padding: 16px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 13px;
}

/* Save My Date template gallery */

.smd-template-section {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #dde3ee;
  border-radius: 14px;
  background: #f8fafc;
}

.smd-template-section h3 {
  margin: 0 0 8px;
}

.smd-selected-template-label {
  margin: 8px 0 14px;
  font-weight: 700;
  color: #0f172a;
}

.smd-template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.smd-template-card {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 10px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.smd-template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.smd-template-card.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.smd-template-thumb-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #f8fafc);
  border: 1px solid #e2e8f0;
}

.smd-template-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.smd-template-meta {
  display: grid;
  gap: 3px;
}

.smd-template-meta strong {
  font-size: 14px;
  color: #0f172a;
}

.smd-template-meta span {
  font-size: 12px;
  color: #64748b;
}

/* ============================================================
   SAVE MY DATE - PUBLIC VIEW / RESPONSE PAGE
   ============================================================ */

.smd-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  gap: 24px;
  align-items: start;
}

.smd-card {
  overflow: hidden;
}

.smd-preview-frame {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.10);
}

#smdPublicResponseForm {
  display: grid;
  gap: 14px;
  width: 100%;
}

#smdPublicResponseForm label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

#smdPublicResponseForm input[type="text"],
#smdPublicResponseForm input[type="email"],
#smdPublicResponseForm textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.85);
  border-radius: 12px;
  font: inherit;
  background: #ffffff;
  color: #111827;
}

#smdPublicResponseForm textarea {
  resize: vertical;
  min-height: 110px;
}

.smd-fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  border-radius: 14px;
}

.smd-fieldset legend {
  padding: 0 8px;
  font-weight: 800;
}

.smd-fieldset label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.smd-fieldset input[type="radio"] {
  width: auto;
  margin: 0;
}

.smd-consent-row {
  display: flex !important;
  align-items: flex-start;
  gap: 10px !important;
  font-weight: 500 !important;
  line-height: 1.45;
}

.smd-consent-row input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
  flex: 0 0 auto;
}

.smd-consent-row span {
  display: inline;
}

#smdPublicResponseForm button[type="submit"] {
  width: fit-content;
  min-width: 180px;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
}

#smdPublicResponseStatus {
  min-height: 24px;
}

/* Share link field on success page */
#smdPublicShareUrl {
  width: min(100%, 720px);
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  margin: 10px 10px 10px 0;
}

#smdCopyShareLinkBtn {
  padding: 12px 18px;
  border-radius: 10px;
}

/* Mobile layout */
@media (max-width: 760px) {
  .smd-page {
    width: min(100% - 20px, 100%);
    padding: 12px 0;
    gap: 16px;
  }

  .smd-preview-frame {
    min-height: 620px;
  }

  #smdPublicResponseForm button[type="submit"] {
    width: 100%;
  }

  #smdPublicShareUrl {
    width: 100%;
    margin-right: 0;
  }

  #smdCopyShareLinkBtn {
    width: 100%;
  }
}

/* Fix radio alignment inside public response form */
#smdPublicResponseForm .smd-fieldset label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  font-weight: 600;
  line-height: 1.3;
}

#smdPublicResponseForm .smd-fieldset input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
}

.smd-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 14px;
}

.smd-response-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
}

.smd-response-table th,
.smd-response-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  text-align: left;
  vertical-align: top;
}

.smd-response-table th {
  font-weight: 800;
  background: rgba(241, 245, 249, 0.9);
}

.smd-response-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 640px) {
  .smd-response-table th,
  .smd-response-table td {
    padding: 10px 12px;
    font-size: 14px;
  }
}
/* :::::::::::::::Reguler CSS (above) ends here ::::::::::::::::::::::*/
/* :::::::::::::::The one below is for SMD documentations only ::::::::::::::::::::::*/

/* ============================================================
   SAVE MY DATE - USER GUIDE SELECTOR
   Isolated styles: do not affect existing SMD components
   ============================================================ */

.smd-guide-panel {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid #dde3ee;
  border-radius: 12px;
  background: #f8fafc;
}

.smd-guide-title {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #172033;
}

.smd-guide-controls {
  display: grid;
  gap: 10px;
}

.smd-guide-controls label {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.smd-guide-select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #172033;
  font-size: 16px;
}

.smd-guide-btn {
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: 10px;
  background: #334155;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.smd-guide-btn:hover {
  opacity: 0.92;
}

.smd-guide-btn:focus-visible,
.smd-guide-select:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}