@import url('https://fonts.googleapis.com/css2?family=Sarabun&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sarabun', sans-serif;
}
body {
    background: linear-gradient(135deg, #e0f7fa, #fce4ec);
    margin: 0;
    padding: 10px 0;
}

.card {
    max-width: 1000px;
    background: #FFF;
    padding: 20px;
    margin: 100px auto;
    margin-top: 0px; /* ลดจากค่าเดิมหรือเพิ่มเข้าไปหากยังไม่มี */
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0, 0.2);
    position: relative;
    padding-top: 50px; /* เผื่อที่ให้ธงด้านบน */

    display: flex;
    flex-direction: column;
    align-items: center;
}
.lang-switch {
    position: absolute;
    top: 10px;
    right: 10px;
}

.lang-switch img {
    height: 20px;      /* กำหนดความสูงเดียวกัน */
    width: auto;       /* ให้ขยายตามอัตราส่วน */
    cursor: pointer;
    margin-left: 5px;
    border-radius: 4px;
    transition: transform 0.2s;
    vertical-align: middle;}

.lang-switch img:hover {
    transform: scale(1.1);
}
.form-control {
    width: 60%;
    margin: 10px auto;
    display: flex;
    align-items: center;   /* ✅ จาก flex-start → center */    
    gap: 10px;
    padding: 1px;

}

.form-control p {
    width: 160px;            /* ✅ ความกว้างคงที่ของ label */
    text-align: right;
    margin: 0;             /* ✅ ลบ margin-top ที่อาจทำให้ไม่ตรงกลาง */
    line-height: 2;      /* ✅ ช่วยให้ข้อความอยู่กลางสวยขึ้น */
    
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-wrapper input,
.input-wrapper textarea {
    width: 100%;
    box-sizing: border-box;
}
.form-content {
    margin-left: -100px;     /* ✅ ขยับไปทางซ้าย */
    width: calc(100% - 40px); /* ✅ ปรับขนาดไม่ให้เกินขอบ card */
}
.txt {
    font-size: 1rem;
    padding: 10px;
    background: #F7F7F7;
    border: 1px solid #E5E5E5;
    border-radius: 5px;
    width: 100%;
}
.btn-submit {
    display: block;
    margin: 10px 190px 10px auto; /* จัดกึ่งกลางและเพิ่มระยะห่าง */
    padding: 12px 40px;          /* ขนาดปุ่ม */
    font-size: 1.1rem;
    background-color: #2196f3;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 380px;            /* ✅ ให้ปุ่มกว้างพอเหมาะ */
}
.btn-submit:hover {
    background-color: #1976d2;   /* เอฟเฟกต์ hover */
}
.txtarea {
    height: 100px;
}
/* --- ปุ่ม Toggle ของประเภทผู้ขอ --- */
.radio-group {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 10px;  /* เพิ่มความห่างจากช่องด้านล่าง */
}
.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-option span {
    display: inline-block;
    min-width: 120px;               /* ✅ กำหนดความกว้างขั้นต่ำให้เท่ากัน */
    padding: 10px 20px;
    border: 2px solid #ccc;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    text-align: center;
    box-sizing: border-box;         /* ✅ รวม padding/border ในขนาด */
    transition: all 0.3s ease;
}
/* เมื่อเลือก */
.radio-option input[type="radio"]:checked + span {
    border-color: #16c21c;
    color: #429f26;
    background-color: #fff;
}

/* เพิ่มเอฟเฟกต์ hover */
.radio-option span:hover {
    border-color: #999;
}

.required-star {
    color: red;
    margin-left: 4px;
    font-weight: bold;
}

.form-instruction {
    background-color: #f0f8ff;
    border-left: 5px solid #2196f3;
    padding: 15px 20px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: #333;
    font-size: 0.95em;
}

.form-instruction h3 {
    margin-top: 5px;
    font-size: 1.1em;
    color: #0a5ea8;
}

.form-instruction ul {
    padding-left: 20px;
    margin: 10px 0 0 0;
}

.form-instruction li {
    margin-bottom: 6px;
}

.required {
    color: red;
    font-weight: bold;
}
