/* ===== SweetAlert Base ===== */
.swal2-popup {
  border-radius: 22px !important;
  padding: 22px !important;
  font-family: 'Sarabun', 'Segoe UI', sans-serif;
}

.swal2-title {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
}

.swal2-html-container {
  margin-top: 12px !important;
}

/* ===== Advice Section ===== */
.advice-section {
  background: #f8faff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.advice-level {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.advice-text {
  font-size: 16px;
  line-height: 1.7;
  color: #334155;
}

/* ===== Advice List ===== */
.advice-list {
  padding-left: 18px;
  margin-top: 10px;
  
}

.advice-list li {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.6;
  color: #334155;
  text-align: left;
}

/* ===== Highlight Box (กรณีคะแนนสูง) ===== */
.advice-danger {
  background: #fef2f2;
  border-left: 6px solid #ef4444;
}

.advice-danger .advice-level {
  color: #ef4444;
}

/* ===== Highlight Box (กรณีคะแนนสูง) ===== */
.advice-warning {
  background: #fff7ed;
  border-left-color: #f59e0b;
}

.advice-warning .advice-level {
  color: #b45309;
}

/* ===== Highlight Box (ไม่มีคะแนน) ===== */
.advice-success {
  background: #f0fdf4;
  border-left: 6px solid #22c55e;
}

.advice-success .advice-level {
  color: #16a34a;
}

/* ===== Emergency / Hotline ===== */
.advice-hotline {
  background: #ecfeff;
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  font-size: 16px;
  color: #0f172a;
}

.advice-hotline b {
  color: #0369a1;
}

/* ===== Video ===== */
.advice-video {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
}

/* ===== Button ===== */
.swal2-confirm {
  border-radius: 20px !important;
  font-size: 16px !important;
  padding: 10px 26px !important;
}



.swal2-popup {
  border-radius: 22px !important;
  padding: 22px !important;
  font-family: 'Sarabun', sans-serif;
}

.rq-section {
  background: #f8faff;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: #334155;
}

.rq-level {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

.rq-list {
  padding-left: 18px;
  font-size: 14px;
}

.rq-list li {
  margin-bottom: 8px;
  text-align: left;
}

.rq-video {
  border-radius: 16px;
  overflow: hidden;
  margin-top: 12px;
}



.btn-advice {
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #546ef1;
  background: #f8faff;
  color: #546ef1;
  font-size: 14px;
  cursor: pointer;
}

.btn-advice:hover {
  background: #546ef1;
  color: #fff;
}



.swal-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.swal-logo img {
  height: 64px;
  max-width: 100%;
}



/* SweetAlert – Calm Success Theme */
.swal2-popup {
  border-radius: 24px !important;
  padding: 24px !important;
  font-family: 'Sarabun', sans-serif;
}

.swal-title {
  font-weight: 600;
  padding-top: 0px;
  margin-top: 0px;
}

.swal-title.success {
  color: #22c55e;
}

.swal-desc {
  font-size: 17px;
  color: #475569;
  margin-top: 8px;
}

.swal-section {
  background: #f0fdf4;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 16px;
  color: #334155;
  text-align: left;
}

.swal-note {
  font-size: 15px;
  color: #64748b;
  margin-top: 12px;
}

.swal-link {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #546ef1, #7c8df5);
  color: #fff !important;
  font-size: 16px;
  text-decoration: none;
}

.swal-link i {
  margin-right: 6px;
}



/* SweetAlert Custom Theme */
.swal2-popup {
  border-radius: 24px !important;
  padding: 24px !important;
  font-family: 'Sarabun', sans-serif;
}

.swal-title {
  color: #546ef1;
  font-weight: 600;
  font-size: 18px;
}

.swal-section {
  background: #f8faff;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 16px;
  color: #334155;
  text-align: left;
}

.swal-note {
  font-size: 15px;
  color: #475569;
  margin-top: 12px;
}

.swal-link {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #546ef1, #7c8df5);
  color: #fff !important;
  font-size: 16px;
  text-decoration: none;
}

.swal-link i {
  margin-right: 6px;
}



.p-5{
  padding: 5px;
}
.p-10{
  padding: 10px;
}

:root{
  --pri:#546ef1;
  --green:#22c55e;
  --yellow:#f59e0b;
  --red:#ef4444;
  --bg:#f8faff;
}

body{ background:var(--bg); }

/* Layout */
.result-container{
  max-width:1100px;
  margin:auto;
  padding:16px;
}

/* Summary */
.summary-box{
  background:#fff;
  border-radius:24px;
  padding:24px;
  text-align:center;
  box-shadow:0 12px 32px rgba(84,110,241,.2);
  margin-bottom:28px;
}

.summary-status{
  font-size:1.4rem;
  font-weight:600;
  margin-top:10px;
}

/* Result grid */
.result-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
  margin-bottom:32px;
}

.result-card{
  background:#fff;
  border-radius:20px;
  padding:20px;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
}

.result-title{
  font-weight:600;
  margin-bottom:8px;
}

.result-score{
  font-size:1.4rem;
  font-weight:700;
}

.result-level{
  margin-top:6px;
  font-size:1.5rem;
}

/* Status colors */
.ok{ color:var(--green); }
.warn{ color:var(--yellow); }
.risk{ color:var(--red); }

/* Footer help */
.help-box{
  background:#fff;
  border-radius:24px;
  padding:24px;
  box-shadow:0 12px 32px rgba(0,0,0,.08);
}

.help-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:16px;
  margin-top:16px;
}

.help-card{
  background:#f1f5ff;
  border-radius:18px;
  padding:16px;
}

.help-card b{
  color:var(--pri);
}



:root{
  --pri:#546ef1;
  --pri2:#7c8df5;
  --soft:#f8faff;
  --border:#e0e7ff;
  --text:#334155;
  --muted:#64748b;
}

.mh-card{
  background:#fff;
  border-radius:20px;
  padding:24px;
  box-shadow:0 12px 32px rgba(84,110,241,.15);
}

.mh-title{
  font-weight:600;
  color:var(--pri);
  margin-bottom:8px;
}

.mh-desc{
  color:var(--muted);
  font-size:.95rem;
  margin-bottom:18px;
}

.mh-q{
  margin: 18px 0 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eef2ff;
}

.mh-q:last-child{ border-bottom:none; padding-bottom:0; }

.mh-q-title{
  font-weight:500;
  color:var(--text);
  line-height:1.5;
  margin-bottom:12px;
}

/* answers */
.mh-answers{
  display:grid;
  gap:12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.mh-answer{ position:relative; }
.mh-answer input{ display:none; }

.mh-answer label{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:54px;
  padding:14px 12px;
  border-radius:16px;
  border:2px solid var(--border);
  background:var(--soft);
  cursor:pointer;
  text-align:center;
  color:var(--text);
  font-size:.95rem;
  transition: all .2s ease;
}

.mh-answer label:hover{ border-color:var(--pri); }

.mh-answer input:checked + label{
  background:linear-gradient(135deg, var(--pri), var(--pri2));
  color:#fff;
  border-color:var(--pri);
  box-shadow:0 10px 24px rgba(84,110,241,.35);
}

@media (max-width:768px){
  .mh-answers{ grid-template-columns: 1fr 1fr; }
}



/* ===== 2Q Theme ===== */
.q2-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(84, 110, 241, 0.15);
}

.q2-title {
  font-weight: 600;
  color: #546ef1;
  margin-bottom: 20px;
}

.q2-q {
  margin-bottom: 28px;
}

.q2-q-title {
  font-weight: 500;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Yes / No Grid */
.q2-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.q2-answer {
  position: relative;
}

.q2-answer input {
  display: none;
}

.q2-answer label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  border-radius: 16px;
  border: 2px solid #e0e7ff;
  background: #f8faff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #334155;
  transition: all 0.25s ease;
}

/* Hover */
.q2-answer label:hover {
  border-color: #546ef1;
}

/* Selected */
.q2-answer input:checked + label {
  background: linear-gradient(135deg, #546ef1, #7c8df5);
  color: #ffffff;
  border-color: #546ef1;
  box-shadow: 0 10px 24px rgba(84, 110, 241, 0.4);
}

/* Sensitive section */
.q2-warning {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #f8faff;
  font-size: 0.9rem;
  color: #475569;
}



/* ===== ST-5 Theme ===== */
.st5-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(84, 110, 241, 0.15);
}

.st5-title {
  font-weight: 600;
  color: #546ef1;
  margin-bottom: 16px;
}

.st5-q {
  margin-bottom: 28px;
}

.st5-q-title {
  font-weight: 500;
  margin-bottom: 12px;
}

/* Answer grid */
.st5-answers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.st5-answer {
  position: relative;
}

.st5-answer input {
  display: none;
}

.st5-answer label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border-radius: 14px;
  border: 2px solid #e0e7ff;
  background: #f8faff;
  cursor: pointer;
  font-size: 0.95rem;
  color: #334155;
  transition: all 0.25s ease;
  text-align: center;
}

/* Hover */
.st5-answer label:hover {
  border-color: #546ef1;
}

/* Selected */
.st5-answer input:checked + label {
  background: linear-gradient(135deg, #546ef1, #7c8df5);
  color: #ffffff;
  border-color: #546ef1;
  box-shadow: 0 10px 24px rgba(84, 110, 241, 0.4);
}

/* Mobile */
@media (max-width: 768px) {
  .st5-answers {
    grid-template-columns: 1fr 1fr;
  }
}




/* ===== Burnout Theme ===== */
.burnout-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(84, 110, 241, 0.15);
}

.burnout-title {
  font-weight: 600;
  color: #546ef1;
  margin-bottom: 6px;
}

.burnout-desc {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 20px;
}

/* Question */
.burnout-q {
  margin-bottom: 28px;
}

.burnout-q-title {
  font-weight: 500;
  margin-bottom: 12px;
}

/* Answer Grid */
.answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

/* Answer Card */
.answer-card {
  position: relative;
}

.answer-card input {
  display: none;
}

.answer-card label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border-radius: 14px;
  border: 2px solid #e0e7ff;
  cursor: pointer;
  font-size: 0.95rem;
  color: #334155;
  transition: all 0.25s ease;
  background: #f8faff;
  text-align: center;
}

/* Hover */
.answer-card label:hover {
  border-color: #546ef1;
}

/* Selected */
.answer-card input:checked + label {
  background: linear-gradient(135deg, #546ef1, #7c8df5);
  color: #ffffff;
  border-color: #546ef1;
  box-shadow: 0 10px 24px rgba(84, 110, 241, 0.4);
}

/* Mobile spacing */
@media (max-width: 768px) {
  .answer-grid {
    grid-template-columns: 1fr 1fr;
  }
}



.rq-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(84, 110, 241, 0.1); /* เปลี่ยนเป็นโทรสี #546ef1 */
}

.rq-title {
  font-weight: 600;
  color: #546ef1; /* ฟ้าใหม่ */
  margin-bottom: 10px;
}

.rq-desc {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 20px;
}

.rq-item {
  margin-bottom: 32px;
}

.rq-question {
  font-weight: 500;
  margin-bottom: 12px;
}

.rq-scale {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rq-scale span {
  font-size: 1.4rem;
}

.rq-scale input[type=range] {
  flex: 1;
  accent-color: #546ef1; /* ฟ้าใหม่ */
}

.rq-result {
  text-align: center;
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: #546ef1; /* ฟ้าใหม่ */
}

.form-control,
.custom-select {
    border: 1px solid #b6d4fe !important;
    box-shadow: none !important;
    background-color: #fff !important;
}

.text-danger {
    color: #e3342f !important;
}

#label-gender-male {
    color: #546ef1; /* ฟ้าใหม่ */
    border-color: #546ef1;
}

#label-gender-female {
    color: #7d91f9; /* ฟ้าอ่อนกว่า */
    border-color: #7d91f9;
}

#label-gender-other {
    color: #3e54c5; /* ฟ้าเข้ม */
    border-color: #3e54c5;
}

.feature-box i {
    margin-bottom: 1px !important;
}

.gender-btn {
    border: 2px solid #b6d4fe;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.gender-btn.active {
    border-color: #546ef1;
    background-color: #e3e7fd;
    font-weight: bold;
    color: #546ef1;
}

.gender-btn .checkmark {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 18px;
    color: #546ef1;
    display: none;
}

.gender-btn.active .checkmark {
    display: inline;
}

.gender-btn i {
    margin-right: 6px;
}

@media (max-width: 767px) {
    .form-action {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 16px;
        border-top: 1px solid #eee;
        z-index: 50;
    }
}

.form-control,
.custom-select {
    border: 1px solid #b6d4fe !important;
    box-shadow: none !important;
    background-color: #fff !important;
}

/* ===== Risk Group Cards ===== */
.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.risk-card {
    position: relative;
    border-radius: 18px;
    background: #ffffff;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    border: 2px solid #e3e7fd;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(84, 110, 241, 0.08);
}

.risk-card:hover {
    transform: translateY(-4px);
}

.risk-card input {
    display: none;
}

.risk-card .icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.risk-card .title {
    font-size: 2rem;
    font-weight: 500;
    color: #546ef1; /* ฟ้าใหม่ */
}

/* Selected */
.risk-card input:checked+.content {
    background: linear-gradient(135deg, #546ef1, #7d91f9);
    color: #fff;
    border-radius: 14px;
    padding: 20px;
}

.risk-card input:checked+.content .title {
    color: #fff;
}

/* Sub group */
.sub-risk {
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    background: #e3e7fd;
}

/* ===== Form Action ===== */
.form-action {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    padding: 20px 0;
}

/* ปุ่มทั่วไป */
.form-action button {
    flex: 1;
    border: none;
    border-radius: 16px;
    font-size: 1.5rem;
    padding: 16px 0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ปุ่มกลับ */
.btn-back {
    background: #e3e7fd!important;
    color: #546ef1;
}

.btn-back:hover {
    background: #c7d0fa!important;
}

/* ปุ่มถัดไป / Submit */
.btn-next {
    background: linear-gradient(135deg, #546ef1, #7d91f9);
    color: #fff;
    box-shadow: 0 10px 24px rgba(84, 110, 241, 0.25);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(84, 110, 241, 0.35);
}

/* ปุ่มกดบนมือถือ */
.form-action button:active {
    transform: scale(0.97);
}

/* Desktop */
@media (min-width: 768px) {
    .form-action {
        justify-content: center;
    }

    .form-action button {
        max-width: 260px;
    }
}
@media (max-width: 576px) {
    #submitBtn {
        font-size: 1.1rem !important;
        padding: 0.8rem 0 !important;
        border-radius: 10px !important;
        max-width: 100% !important;
    }
}
