/* ---------------- พื้นหลังหลัก ---------------- */
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
}

/* ---------------- ไอคอนล็อกอิน ---------------- */
.login-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 30px;
    transition: background-color 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);}

.login-icon i {
    font-size: 24px;
    margin-right: 8px;
}

.login-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.login-icon:hover {
    background-color: #0056b3;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* ---------------- Modal (Pop-up Login) ---------------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 40px;
    border: 1px solid #888;
    width: 500px;
    max-width: 90%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: fadeIn 0.3s ease;
}

@media (max-width: 576px) {
    .modal-content {
        width: 90%;
        padding: 30px;
    }
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    color: #888;
    cursor: pointer;
}

.close:hover {
    color: red;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.form-group {
    text-align: left;
    margin-bottom: 12px;
}

.form-control {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    width: 100%;
    font-size: 16px;
}

.btn-login {
    background-color: #007bff;
    color: white;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    transition: background 0.3s;
}

.btn-login:hover {
    background-color: #0056b3;
}

.main-section {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #f4f4f9;
}

.box2 {
    background: #ffffff;
    padding: 50px 40px;         /* เพิ่มความสูงภายใน */
   
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);    
    max-width: 800px;
    width: 100%;
    min-height: 350px;          /* ปรับให้กล่องดูสูงขึ้น */
    margin: 40px auto;          /* ลดความห่างจากด้านบน */
    text-align: center;
    box-sizing: border-box;
  }
  

  .box2 .mt-5 {
    margin-top: 1.5rem !important;
  }
  
  .box2 .my-5 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  .floating-logo {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .logo-wrapper {
    margin-bottom: 20px;
  }
  
  .school-logo {
    width: 90px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

.subheading-muted {
  color: #6c757d;
  font-weight: 500;
  font-size: 18px;
}

.box2 h3 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    white-space: normal;
    line-height: 1.5;
}

.box2 h5 {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.logo-container {
    position: relative;
    top: -50px;
    display: inline-block;
    background: white;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  }
  
  .modal-logo {
    width: 100px;
    height: auto;
    border-radius: 50%;
  }

.btn-success {
    background-color: #28a745;
    color: white;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    transition: background 0.3s;
    width: 100%;
    
}

.btn-success:hover {
    background-color: #218838;
}

/* ---------------- Modal กรอกข้อมูลคำร้อง ---------------- */
#requestModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

#requestModal .modal-content {
    background-color: #ffffff;
    padding: 40px 30px 30px;
    border-radius: 16px;
    max-width: 70%;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    animation: fadeIn 0.3s ease;
    position: relative;
    padding-top: 60px;
    overflow: visible;
    font-family: 'Segoe UI', sans-serif;
    margin-top: 60px;
}

@media (max-width: 768px) {
    #requestModal .modal-content {
        width: 100%;
        padding: 30px 20px 20px;
        border-radius: 12px;
    }
}

@media (max-width: 576px) {
    h3.font-weight-bold {
      font-size: 1.25rem; /* ปรับขนาดให้เล็กลง */
    }
  
    h5.text-muted {
      font-size: 1rem; /* ปรับขนาดให้เล็กลง */
    }
  }

#requestModal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 22px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

#requestModal .close:hover {
    color: #dc3545;
}

#requestModal .modal-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    color: #1c1c1e;
}

#requestModal .btn-primary,
#requestModal .btn-submit {
    background-color: #1c077c;
    color: white;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    transition: background-color 0.3s ease-in-out;
}

#requestModal .btn-primary:hover,
#requestModal .btn-submit:hover {
    background-color: #3112a0;
}

.logo-container {
    position: absolute;
    top: -65px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    border-radius: 50%;
    width: 110px;
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.school-logo-modal {
    width: 90px;
    height: auto;
    border-radius: 50%;
}

.form-floating-custom {
    position: relative;
    margin-bottom: 20px;
}

.form-control-custom {
    width: 100%;
    padding: 18px 12px 6px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9fafb;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.form-control-custom:focus {
    border-color: #1c077c;
    background-color: #ffffff;
}

.form-floating-custom label {
    position: absolute;
    top: 10px;
    left: 14px;
    background-color: #ffffff;
    padding: 0 4px;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

.form-control-custom:focus + label,
.form-control-custom:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: #1c077c;
}

.radio-group .form-check {
    margin-bottom: 10px;
}

.radio-group .form-check-input {
    margin-top: 0.3rem;
    transform: scale(1.1);
    cursor: pointer;
}

.radio-group .form-check-label {
    margin-left: 6px;
    font-size: 16px;
    font-weight: 500; /* หรือ 600, 700 ก็ได้ */
    color: #333;
}

.radio-group input[type="text"] {
    max-width: 250px;
    height: 35px;
    margin-left: 10px;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* ✅ หนังสือในแบบฟอร์มคำร้อง */
.form-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
    text-align: center; /* ✅ จัดตรงกลาง */
    color: #1c1c1e;
  }

  h5.mt-4 {
    margin-top: 15px !important;
    margin-bottom: 2%;
  }

  .heading-container {
    text-align: center;
    margin-bottom: 20px;
  }
  
  .main-title {
    font-weight: bold;
    margin-bottom: 0.25rem;
  }
  
  .sub-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
  }
  
  .en-shadow {
    color: #adb5bd; /* เทาอ่อนมืออาชีพ */
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.2;
    margin-top: -0.25rem; /* ยกขึ้นเล็กน้อยให้ดูเป็นเงา */
  }

  input[readonly] {
    background-color: #f9f9f9;
    cursor: not-allowed;
  }

  #statusModal .modal-content {
    width: 800px;
    height: 440px;
  }


  .step-tracker {
    display: flex;
    justify-content: 20px;
    align-items: center;
    /* margin: 20px auto 10px; */
    max-width: 1000px;
    position: relative;
    padding: 0 10px;
  }
  
  .step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
  }
  
  .step .icon {
    width: 44px;
    height: 44px;
    background-color: #ccc;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: background-color 0.3s;
    position: relative;
    z-index: 2;
  }
  
  .step.active .icon {
    background-color: #28a745;
  }
  
  .step .label {
    font-size: 0.85rem;
    margin-top: 6px;
    color: #999;
    white-space: nowrap;
  }
  
  .step.active .label {
    color: #28a745;
    font-weight: 600;
  }
  
  /* เส้นเชื่อมระหว่าง step */
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px; /* เส้นอยู่กลางวงกลม (วง 44px => 22px) */
    left: 50%;
    right: -50%;
    height: 4px;
    background-color: #ccc;
    z-index: 0;
  }
  
  .step.active:not(:last-child)::after {
    background-color: #28a745;
  }
  
  
  @keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
  }
  
  .step.current .icon {
    background-color: #28a745;
    animation: pulse 1.6s infinite;
  }
  

  /* test
  /* ==== Card คำร้องใน modal ==== */
.request-card {
  background-color: #fff;
  border: 1px solid #ccc;
  border-left: 4px solid #007bff;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* ==== Step Tracker ==== */
.step-tracker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.step {
  text-align: center;
  flex: 1;
  position: relative;
  color: #ccc;
}

.step .icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 5px;
  border-radius: 50%;
  background-color: #eee;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.step.active .icon {
  background-color: #28a745;
  color: #fff;
}

.step.current .icon {
  background-color: #28a745;
  color: #fff;
  animation: pulse 1.3s infinite;
}

.step .label {
  font-size: 12px;
  white-space: nowrap;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

#statusModal .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 60px 20px 20px;
  width: 100%;
  max-width: 900px;
  margin: auto;
  border-radius: 8px;
  position: relative;
  overflow: visible; /* ✅ ให้โลโก้ยื่นออกมาได้ */
  max-height: 90vh;
}

/* ✅ ใส่ scroll ให้เนื้อหาใน modal (เฉพาะ list คำร้อง) */
#status_requests_list {
  overflow-y: auto;
  max-height: calc(90vh - 250px); /* ปรับให้ไม่ชนปุ่มล่าง */
  max-height: 60vh;
  padding-right: 10px;
  padding-bottom: 40px; /* เผื่อปุ่มล่าง */
}

