/* Import Prompt Font */
@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@300;400;500;600;700&display=swap');

/* Global Styles */
* {
    font-family: 'Bai Jamjuree', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #2c3e50;
}

/* Container Styles */
.container {
    max-width: 1200px;
    padding: 2rem;
}

/* Header Styles */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 600;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

/* Form Styles */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* Button Styles */
.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #4a90e2;
    border-color: #4a90e2;
}

.btn-primary:hover {
    background-color: #357abd;
    border-color: #357abd;
    transform: translateY(-2px);
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #138496;
    color: white;
}

/* Contact Info Box */
.contact-info {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.contact-info h5 {
    color: #4a90e2;
    margin-bottom: 1rem;
}

/* Rental Rules Box */
.rental-rules {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.rental-rules h5 {
    color: #4a90e2;
    margin-bottom: 1.5rem;
}

.rental-rules ol {
    padding-left: 1.2rem;
}

.rental-rules li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background-color: #4a90e2;
    color: white;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 1.5rem;
}

.modal-title {
    color: white;
    font-weight: 500;
}

.modal-body {
    padding: 2rem;
}

/* Table Styles */
.table {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.table thead th {
    vertical-align: middle;
    background-color: #4a90e2;
    color: white;
    font-weight: 500;
    border: none;
    text-align: center;
}

.table td {
    vertical-align: middle;
}

/* Badge Styles */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Print Page Styles */
.rental-info {
    background-color: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .table-responsive {
        margin: 0 -1rem;
    }
    
    .rental-rules, .contact-info {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* ปรับปรุง Font Size สำหรับ Mobile */
@media (max-width: 576px) {
    body {
        font-size: 14px;
    }
    
    .table {
        font-size: 13px;
    }
    
    .badge {
        font-size: 11px;
    }
}

/* Animation Styles */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* สีสถานะเพิ่มเติม */
.bg-info {
    background-color: #20c997 !important; /* สีเขียวมิ้นท์ */
}

/* แก้ไข CSS สำหรับ Modal บน iOS */
@media (max-width: 768px) {
    /* ปรับ body เมื่อเปิด modal */
    body.modal-open {
        position: relative !important;
        overflow: hidden !important;
        width: 100% !important;
        height: 100% !important;
    }

    .modal {
        background: white;
        padding: 0;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        margin: 0;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .modal-backdrop {
        display: none !important;
    }
    
    .modal-dialog {
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 100% !important;
        position: relative !important;
        transform: none !important;
    }
    
    .modal-content {
        min-height: 100vh !important;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    
    .modal-header {
        position: sticky;
        top: 0;
        background: #4a90e2;
        z-index: 1050;
    }
    
    .modal-body {
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
        flex: 1 1 auto;
    }
    
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 1050;
        padding: 1rem;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        flex: 1;
        margin: 0;
        min-width: calc(50% - 0.25rem);
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .modal {
        height: 100vh !important;
        height: -webkit-fill-available !important;
    }
    
    .modal-content {
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
    }
}

/* ปรับแต่งการแสดงผลตาราง */
@media (max-width: 768px) {
    .table-responsive {
        margin: 0;
        border-radius: 0;
    }
    
    .container {
        padding: 1rem;
        max-width: 100%;
    }
} 