/* ═══════════════════════════════════════════════════════════════
   Guide Match — Quiz & Results Styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── Hero ─────────────────────────────────────────────────── */
.gm-hero {
  text-align: center;
  padding: 32px 20px 20px;
}
.gm-hero h1 {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 8px;
}
.gm-hero h1 i {
  color: #2e86de;
  margin-right: 8px;
}
.gm-hero p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

/* ─── Quiz container ──────────────────────────────────────── */
.gm-quiz {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ─── Progress bar ────────────────────────────────────────── */
.gm-progress {
  background: #eee;
  border-radius: 20px;
  height: 8px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.gm-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2e86de, #54a0ff);
  border-radius: 20px;
  width: 20%;
  transition: width 0.4s ease;
}
.gm-progress-text {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #999;
  margin-bottom: 24px;
}

/* ─── Steps ───────────────────────────────────────────────── */
.gm-step {
  display: none;
}
.gm-step.is-active {
  display: block;
  animation: gm-fadeIn 0.3s ease;
}
@keyframes gm-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gm-step h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
}
.gm-hint {
  font-size: 14px;
  color: #999;
  margin: 0 0 20px;
}

/* ─── Option buttons ──────────────────────────────────────── */
.gm-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gm-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
}
.gm-opt:hover {
  border-color: #bbb;
  background: #fafafa;
}
.gm-opt.is-selected {
  border-color: #2e86de;
  background: #eef6ff;
  box-shadow: 0 0 0 1px #2e86de;
}

.gm-opt-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.gm-opt-emoji {
  font-size: 28px;
  flex-shrink: 0;
  width: 42px;
  text-align: center;
}

.gm-opt-label {
  font-weight: 600;
  color: #1a1a2e;
  display: block;
  line-height: 1.3;
}
.gm-opt-sub {
  font-size: 12px;
  color: #999;
  display: block;
  line-height: 1.3;
  margin-top: 2px;
}

/* Activities — compact pill layout */
.gm-options-activities {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
.gm-opt-sm {
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  gap: 0;
}
.gm-opt-sm.is-selected {
  background: #2e86de;
  border-color: #2e86de;
  color: #fff;
  box-shadow: none;
}

/* ─── Nav buttons ─────────────────────────────────────────── */
.gm-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}
.gm-nav-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  font-family: inherit;
}
.gm-nav-back {
  background: transparent;
  color: #666;
}
.gm-nav-back:hover {
  color: #333;
}
.gm-nav-back i { margin-right: 4px; }

.gm-nav-next {
  background: #2e86de;
  color: #fff;
  margin-left: auto;
}
.gm-nav-next:hover {
  background: #1a6fc4;
}
.gm-nav-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.gm-nav-next i { margin-left: 4px; }

/* ─── Results ─────────────────────────────────────────────── */
.gm-results {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.gm-results-header {
  text-align: center;
  margin-bottom: 24px;
}
.gm-results-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 8px;
}
.gm-results-header h2 i {
  color: #2e86de;
  margin-right: 8px;
}
.gm-results-header p {
  font-size: 15px;
  color: #666;
  margin: 0 0 16px;
}

.gm-results-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gm-btn-save-all,
.gm-btn-retake {
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.gm-btn-save-all {
  background: #2e86de;
  color: #fff;
}
.gm-btn-save-all:hover {
  background: #1a6fc4;
}
.gm-btn-save-all.is-saved {
  background: #27ae60;
  cursor: default;
}
.gm-btn-save-all:disabled:not(.is-saved) {
  opacity: 0.5;
  cursor: not-allowed;
}
.gm-btn-save-all i,
.gm-btn-retake i {
  margin-right: 5px;
}

.gm-btn-share {
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #2e86de;
  background: transparent;
  color: #2e86de;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.gm-btn-share:hover {
  background: #2e86de;
  color: #fff;
}
.gm-btn-share.is-copied {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
  cursor: default;
}
.gm-btn-share i {
  margin-right: 5px;
}

.gm-btn-retake {
  background: #f0f0f0;
  color: #555;
}
.gm-btn-retake:hover {
  background: #e0e0e0;
}

/* ─── Results tabs ────────────────────────────────────────── */
.gm-results-tabs {
  display: flex;
  border-bottom: 2px solid #eee;
  margin-bottom: 24px;
  gap: 0;
}
.gm-results-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  font-family: inherit;
}
.gm-results-tab:hover {
  color: #555;
}
.gm-results-tab.is-active {
  color: #2e86de;
  border-bottom-color: #2e86de;
}
.gm-results-tab i {
  margin-right: 5px;
}
.gm-results-tab span {
  font-weight: 400;
  font-size: 13px;
}

/* ─── Island sub-tabs ─────────────────────────────────────── */
.gm-island-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.gm-island-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  background: #f4f5f7;
  border: 2px solid transparent;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1.3;
}

.gm-island-tab i {
  font-size: 14px;
  opacity: 0.7;
}

.gm-island-tab:hover {
  background: #eaecf0;
  color: #444;
}

.gm-island-tab.is-active {
  background: #fff;
  border-color: var(--tab-color, #2e86de);
  color: var(--tab-color, #2e86de);
}

.gm-island-tab.is-active i {
  opacity: 1;
}

.gm-island-tab-count {
  display: inline-block;
  background: #e8e8e8;
  color: #888;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}

.gm-island-tab.is-active .gm-island-tab-count {
  background: var(--tab-color, #2e86de);
  color: #fff;
}

@media (max-width: 500px) {
  .gm-island-tabs {
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .gm-island-tab {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* ─── Island groups in results ────────────────────────────── */
.gm-island-group {
  margin-bottom: 28px;
}
.gm-island-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid currentColor;
}

/* ─── Match card grid ─────────────────────────────────────── */
.gm-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gm-match-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.gm-match-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.gm-match-img-wrap {
  position: relative;
  width: 100%;
  height: 170px;
  overflow: hidden;
  background: #f0f0f0;
}
.gm-match-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Match badges ────────────────────────────────────────── */
.gm-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.gm-badge-top {
  background: #f0932b;
  color: #fff;
}
.gm-badge-great {
  background: rgba(255,255,255,0.92);
  color: #2e86de;
  border: 1px solid rgba(46,134,222,0.3);
}

/* ─── Match card body ─────────────────────────────────────── */
.gm-match-body {
  padding: 12px 14px 8px;
  flex: 1;
}
.gm-match-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 5px;
  line-height: 1.3;
}
.gm-match-name a {
  color: #1a1a2e;
  text-decoration: none;
}
.gm-match-name a:hover {
  color: #2e86de;
}

.gm-match-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
  line-height: 1.4;
}
.gm-match-meta i { color: #f0932b; }

.gm-match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.gm-match-tag {
  padding: 3px 8px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 11px;
  color: #666;
}

/* ─── Match card footer ───────────────────────────────────── */
.gm-match-footer {
  display: flex;
  gap: 8px;
  padding: 8px 14px 14px;
}
.gm-btn-view,
.gm-btn-add {
  flex: 1;
  padding: 8px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  border: none;
  font-family: inherit;
}
.gm-btn-view {
  background: #f5f5f5;
  color: #333;
  display: block;
}
.gm-btn-view:hover {
  background: #e8e8e8;
  color: #333;
}
.gm-btn-add {
  background: transparent;
  border: 1.5px solid #2e86de;
  color: #2e86de;
}
.gm-btn-add:hover {
  background: #2e86de;
  color: #fff;
}
.gm-btn-add.is-saved {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
  cursor: default;
}
.gm-btn-add i {
  margin-right: 3px;
}

.gm-no-results {
  text-align: center;
  color: #999;
  padding: 40px 20px;
  font-size: 15px;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .gm-hero h1 { font-size: 22px; }
  .gm-hero p { font-size: 14px; }
  .gm-step h2 { font-size: 19px; }
  .gm-opt { padding: 12px 14px; gap: 10px; }
  .gm-opt-icon { width: 36px; height: 36px; font-size: 16px; }
  .gm-opt-emoji { font-size: 24px; width: 36px; }
  .gm-match-grid { grid-template-columns: 1fr; }
  .gm-match-img-wrap { height: 150px; }
  .gm-results-actions { flex-direction: column; align-items: stretch; }
  .gm-btn-save-all, .gm-btn-retake { text-align: center; }
}

/* ─── Print ───────────────────────────────────────────────── */
@media print {
  .gm-quiz, .gm-nav, .gm-btn-add, .gm-btn-save-all, .gm-btn-share, .gm-btn-retake, .gm-island-tabs { display: none !important; }
  .gm-match-card { break-inside: avoid; border: 1px solid #ccc; }
}
