/* ระบบจองโต๊ะและสั่งซื้อเสื้อที่ระลึก งานคืนสู่เหย้า โรงเรียนเดชอุดม */
/* โทนสีหลัก: สีเทา สีแดง */
/* ตัวอักษร: Prompt */

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

:root {
    --primary-color: #dc3545; /* สีแดง */
    --secondary-color: #6c757d; /* สีเทา */
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    background: linear-gradient(135deg, var(--light-gray) 0%, #e9ecef 100%);
    min-height: 100vh;
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #c82333 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.school-info {
    text-align: center;
    margin-bottom: 1rem;
}

.school-name {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.school-address {
    font-size: 0.9rem;
    opacity: 0.9;
}

.system-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    padding: 0.8rem;
    border-radius: 10px;
    margin: 1rem auto;
    max-width: 800px;
}

/* Navigation */
.navbar {
    background: var(--white) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.nav-link {
    color: var(--secondary-color) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Login Section */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-title {
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.google-login-btn {
    width: 100%;
    background: #4285f4;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.google-login-btn:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.3);
    color: white;
    text-decoration: none;
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #c82333 100%);
    color: var(--white);
    border-radius: 15px 15px 0 0 !important;
    padding: 1.5rem;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #c82333 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, #c82333 0%, var(--primary-color) 100%);
}

.btn-secondary {
    background: var(--secondary-color);
    border: none;
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: 500;
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

.btn-danger {
    background: var(--danger);
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info);
    border-left: 4px solid var(--info);
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, #c82333 100%);
    color: var(--white);
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-color: #e9ecef;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(220, 53, 69, 0.05);
}

/* Status Badges */
.status-pending {
    background: var(--warning);
    color: #856404;
}

.status-confirmed {
    background: var(--success);
    color: white;
}

.status-cancelled {
    background: var(--danger);
    color: white;
}

.status-paid {
    background: var(--info);
    color: white;
}

/* Table Selection */
.table-seat {
    width: 60px;
    height: 60px;
    margin: 5px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.table-available {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.table-available:hover {
    background: #218838;
    transform: scale(1.05);
}

.table-reserved {
    background: var(--warning);
    color: #856404;
    border-color: var(--warning);
    cursor: not-allowed;
}

.table-booked {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    cursor: not-allowed;
}

.table-selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.table-vip {
    background: #6f42c1;
    color: white;
    border-color: #6f42c1;
}

/* QR Code Section */
.qr-code-container {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.qr-code-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .school-name {
        font-size: 1.4rem;
    }
    
    .system-title {
        font-size: 1.2rem;
        margin: 0.5rem;
        padding: 0.6rem;
    }
    
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .table-seat {
        width: 45px;
        height: 45px;
        font-size: 0.8rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Utilities */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.rounded-custom {
    border-radius: 15px !important;
}

/* Modern scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Memorial Product Images */
.product-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-image:hover {
    transform: scale(1.05);
}

.memorial-image-gallery {
    position: relative;
}

.memorial-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.memorial-image-overlay:hover {
    opacity: 1;
}

.memorial-image-overlay .btn {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.memorial-image-overlay:hover .btn {
    transform: scale(1);
}

/* Image Modal Carousel */
.carousel-inner .carousel-item img {
    border-radius: 8px;
}

.carousel-caption {
    background: rgba(0,0,0,0.7);
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

/* Product Card Badges */
.product-card .badge {
    font-size: 0.75rem;
    border-radius: 6px;
}

.product-card .position-absolute .btn {
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
}

.product-card .position-absolute .btn:hover {
    background: rgba(255,255,255,0.9);
    color: var(--dark-gray);
}
