/* ===============================
   1. Font Declarations 
   =============================== */
@font-face {
    font-family: 'NTBold';
    src: url('../NT Font/NT Bold.woff2') format('woff2'),
         url('../NT Font/NT Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'NTRegular';
    src: url('../NT Font/NT Regular.woff2') format('woff2'),
         url('../NT Font/NT Regular.ttf') format('truetype');
}

/* ===============================
   2. Global Styles
   =============================== */
body {
  font-family: 'NTRegular', sans-serif;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
    background-image: url("../img/background5.png");
  background-repeat: no-repeat;
    background-size: contain;
  margin-top: 10px;
  border: 1px solid transparent;
  box-sizing: border-box;
  padding-top: 1px;
    
}

/* สำหรับแท็บเล็ตและมือถือ (หน้าจอที่มีความกว้างน้อยกว่าหรือเท่ากับ 768px) */
@media (max-width: 768px) {
  body {
    background-size: contain;
  }
  
.qrcode_mock.text-center {
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    width: auto;
}

/* ปรับขนาดและการจัดวาง container ของ QR code */
#canvas {
    margin: 0 auto;
}

/* ปรับความกว้างของ input field ให้เต็มหน้าจอ */
#qr_data {
    width: 100% !important;
}

.qr-result {
  max-width: 250px;
  align-items: center;
}

#qr_data {
  width: 100% !important;
  align-items: center;
}

.left-block, .right-block {
  display: none;
}
}



/* ===============================
   3. Typography
   =============================== */
h1 {
  text-align: center;
  margin-top: 5%;
  font-family: 'NTBold', sans-serif;
}

h2 {
  text-align: center;
  font-size: 12px;
  position: relative;
  top: -10px;
  font-family: 'NTBold', sans-serif;
}

img {
  float: center;
  max-width: fit-content;
  margin-bottom: 5%;
}

.container-fluid {
  max-width: 100%;
  margin-top: 4%;
  max-height: 100%;
  text-align: center;
  margin-bottom: 60px;
}

@media (max-width: 450px) {
  .container-fluid {
    margin-top: 20%;
  }
  .col-12 col-xl-3 {
    text-align: center;
  }
}

.form-control.form-control-lg {
  width: 100%;
  height: 100%;
  font-size: 14px;
}

/* เพิ่ม style สำหรับ main content */
main {
  flex: 1 0 auto; /* ทำให้ main content ยืดเต็มพื้นที่ที่เหลือ */
}

/* ปรับ style ของ footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 0;
    z-index: 1000;
}

.footer-circle {
    background-color: white;
    width: 200px;
    height: 50px;
    border-radius: 100px 100px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.footer-logo {
    width: 150px;
    height: auto;
    margin-bottom: 10px;
}

/* Responsive design สำหรับ footer */
@media (max-width: 768px) {
    .footer-circle {
        width: 150px;
        height: 40px;
        border-radius: 75px 75px 0 0;
        padding-top: 15px;
    }

    .footer-logo {
        width: 100px;
        margin-bottom: 10px;
    }
}

/* สำหรับหน้าจอที่เล็กมาก */
@media (max-width: 320px) {
    .footer-circle {
        width: 120px;
        height: 60px;
        border-radius: 60px 60px 0 0;
        padding-top: 10px;
    }

    .footer-logo {
        width: 80px;
        margin-bottom: 8px;
    }
}

.btn {
    font-family: 'NTRegular', sans-serif; /* ใช้ฟอนต์ NT Regular สำหรับปุ่ม */
}

/* ถ้าต้องการใช้ฟอนต์ Bold สำหรับปุ่มดาวน์โหลด */
#downloadButton small {
    font-family: 'NTBold', sans-serif; /* ใช้ฟอนต์ NT Bold สำหรับข้อความในปุ่มดาวน์โหลด */
}

/* ปรับ style สำหรับคอลัมน์ QR code */
.qr-column {
    margin-bottom: 20px;
}



/* สำหรับหน้าจอขนาดเล็กมาก */
@media (max-width: 450px) {
    .qrcode_mock.text-center {
        padding: 10px;
        width: 300px !important;
        height: 300px !important;
    }
}

/* เพิ่ม style ใหม่สำหรับปุ่มดาวน์โหลด */
#downloadButton {
    transition: transform 0.2s ease;
    margin-bottom: 0;
}

#downloadButton:hover {
    transform: scale(1.5);
}


    

/* style สำหรับบล็อคด้านข้างทั้งซ้ายและขวา */
.left-block, .right-block {
    background-color: transparent;
    min-height: 600px;
    margin: 0 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* สไตล์สำหรับรูปภาพด้านข้าง */
.side-image {
    width: 100%;
    height: 300px;
    position: absolute;
    top: 150px;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.side-image img {
    width: 150%;
    height: auto;
    object-fit: contain;
    max-height: 120%;
}

/* คอนเทนเนอร์สำหรับรูป GIF ฝั่งซ้าย */
.left-block .feature-image-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, 90%);
    width: 100%;
    text-align: center;
    z-index: 2;
}

.right-block .feature-image-container {
    position: absolute;
    left: 50%;
    top: 75%;
    transform: translate(-50%, -300%);
    width: 100%;
    text-align: center;
    z-index: 2;
}

/* สไตล์สำหรับรูป GIF */
.feature-image {
    width: 100%;
    height: auto;
    max-width: 200px;
}

/* ปรับ responsive */
@media (max-width: 768px) {
    .left-block, .right-block {
        display: none;
    }
    
    .side-image img {
        width: 70%;
    }
}

/* ปรับความกว้างของคอลัมน์กลาง */
.qr-column {
    max-width: 600px;
}

/* ปรับ animation ของปุ่มทั้งสอง */
#downloadButton, #CreateButton {
    transition: transform 0.2s ease;
}

#downloadButton:hover, #CreateButton:hover {
    transform: scale(1.1);
}

/* ===============================
   4. Layout Components
   =============================== */
.left-block, .right-block {
    background-color: transparent;
    min-height: 600px;
    margin: 0 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Circles */
.left-block .circle, .right-block .circle {
    width: 100%;
    height: 300px;
    background-color: #FFB800;
    border-radius: 100px / 150px;
    position: absolute;
    top: 20px;
    z-index: 1;
}

/* ===============================
   5. QR Code Styles
   =============================== */
.qr-result {
    max-width: 300px;
    margin: 0 auto;
}

#canvas {
    background-color: white;
    padding: 10px;
    border-radius: 15px;
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    flex-direction: column;
}

.semi-circle-bg {
    background-color: #FFD700;
    width: 400px;
    height: 700px;  
    border-radius: 200px 200px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-bottom: 0;
    padding-bottom: 10px;
}

.qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.download-wrapper {
    margin-top: 20px;
}

/* .small-semi-circle {
    background-color: #FFD700;
    width: 200px;
    height: 100px;
    border-radius: 100px 100px 0 0;
    margin-top: 20px;
} */

#canvas {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

#downloadButton {
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
    text-align: center;
    transition: transform 0.2s ease;
    margin-bottom: 0;
}

#downloadButton:hover {
    transform: scale(1.1);
}

/* ===============================
   6. Responsive Styles
   =============================== */
@media (max-width: 768px) {
    body {
        background-size: contain;
    }
    
    .qr-result {
        max-width: 250px;
        align-items: center;
    }
    
    #qr_data {
        width: 100% !important;
        align-items: center;
    }
    
    .left-block {
        display: none;
    }

    .middle-block {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .qr-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* .semi-circle-bg {
        width: 300px;
        height: 500px;
    } */

    /* .small-semi-circle {
        width: 150px;
        height: 75px;
    } */

    #canvas {
        width: 100%;
        max-width: 300px;
        padding: 10px;
    }

    #downloadButton {
        margin-top: 20px;
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .container-fluid {
        margin-bottom: 40px;
    }

    .footer-circle {
        height: 40px;
    }
}

.form {
    padding: 20px 20px !important; /* ลดระยะห่างด้านบนและล่าง */
}

.form-outline.mb-4 {
    margin-bottom: 10px !important; /* ลดระยะห่างหลังจาก input */
}

.text-center.mb-4 {
    margin-bottom: 1px !important; /* ลดระยะห่างหลังจากปุ่มสร้าง QR */
}

.qr-container {
    padding: 10px;  /* ลดระยะห่างรอบ container */
    margin-top: -30px; /* ขยับขึ้นเล็กน้อย */
}

.semi-circle-bg {
    padding: 10px;  /* ลดระยะห่างภายใน semi-circle */
    height: 500px;  /* ปรับความสูงให้กระชับขึ้น */
}

.qr-content {
    gap: 10px;  /* ลดระยะห่างระหว่างองค์ประกอบ */
}

.download-wrapper {
    margin-top: -80px;  /* ลดระยะห่างด้านบนของปุ่มดาวน์โหลด */
}

.small-semi-circle {
    margin-top: 10px;  /* ลดระยะห่างด้านบนของวงรีเล็ก */
}

/* ปรับ responsive */
@media (max-width: 768px) {
    .semi-circle-bg {
        height: 450px;  /* ปรับความสูงให้กระชับขึ้นสำหรับมือถือ */
    }
    .form_action {
        margin-top: 1px;  /* ลดระยะห่างด้านบนของปุ่มสร้าง QR */
    }
    /* ปรับ container หลัก */
    .container-fluid {
        padding: 0 15px;
        margin-top: 5px;
        /* transform: scale(0.65); */
        transform-origin: top center;
    }

    /* ปรับ input container */
    .form-outline {
        width: 100%;
        margin-bottom: 15px;
    }

    /* ปรับ input field */
    #qr_data {
        width: 70% !important;
        height: 15px;
        padding: 8px 15px;
        font-size: 14px;
        border: 1px solid #ddd;
        border-radius: 25px;
        background-color: #fff;
        color: #333;
    }

    /* ปรับ placeholder */
    #qr_data::placeholder {
        color: #999;
        font-size: 15px;
    }

    /* ปรับ focus state */
    #qr_data:focus {
        outline: none;
        border-color: #FFB800;
        box-shadow: 0 0 0 2px rgba(255, 184, 0, 0.2);
    }

    .right-block .circle {
        width: 50%;
        height: 150px;
        background-color: #FFB800;
        border-radius: 100px / 150px;
        position: absolute;
        top: 20px;
        z-index: 1;
    }
}

/* สำหรับหน้าจอที่เล็กมาก */
@media (max-width: 320px) {
    h1 {
        font-size: 20px;
    }

    #qr_data {
        width: 95% !important;
        height: 40px;
        font-size: 13px;
    }
}
