/* Content Gate – khóa bài học */
.tgl-gate-excerpt {
  opacity: 0.85;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.tgl-gate-locked {
  margin: 1.5rem 0;
}

.tgl-gate-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.tgl-gate-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.tgl-gate-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #0f172a;
}

.tgl-gate-msg {
  color: #64748b;
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.tgl-gate-pkg-note {
  font-size: 0.85rem;
  color: #475569;
  margin: 0 0 1rem;
}

.tgl-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.tgl-gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.3;
}

.tgl-gate-btn-primary {
  background: #16a34a;
  color: #fff !important;
  border-color: #16a34a;
}
.tgl-gate-btn-primary:hover {
  background: #15803d;
  border-color: #15803d;
  color: #fff !important;
}

.tgl-gate-btn-outline {
  background: #fff;
  color: #0f172a !important;
  border-color: #cbd5e1;
}
.tgl-gate-btn-outline:hover {
  border-color: #16a34a;
  color: #16a34a !important;
}

.tgl-gate-btn-block {
  width: 100%;
  margin-top: 0.5rem;
}

/* Modal */
.tgl-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tgl-gate-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.tgl-gate-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.tgl-gate-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
}
.tgl-gate-modal-close:hover {
  color: #0f172a;
}

.tgl-gate-modal-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.tgl-gate-modal-desc {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.tgl-gate-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1.15rem;
  text-align: center;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
}
.tgl-gate-input:focus {
  outline: none;
  border-color: #16a34a;
}

.tgl-gate-result {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.tgl-gate-result.is-ok {
  color: #059669;
  font-weight: 600;
}
.tgl-gate-result.is-err {
  color: #dc2626;
}

/* Inline redeem */
.tgl-gate-redeem-inline {
  max-width: 360px;
  margin: 1.5rem auto;
  padding: 1.25rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  text-align: center;
}
.tgl-gate-redeem-inline h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}
.tgl-gate-redeem-form-inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.tgl-gate-redeem-form-inline .tgl-gate-input {
  flex: 1;
  min-width: 120px;
  margin-bottom: 0;
}

.tgl-gate-status {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}
.tgl-gate-status-ok {
  background: #dcfce7;
  color: #166534;
}
.tgl-gate-status-lock {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 480px) {
  .tgl-gate-actions {
    flex-direction: column;
  }
  .tgl-gate-btn {
    width: 100%;
  }
}
