/* 
 * POSN Style CSS - Clean Version (No Button Overrides)
 * สไตล์ส่วนกลางสำหรับระบบจัดการข้อมูลโอลิมปิกวิชาการ
 * ใช้ sb-admin-2 button defaults เท่านั้น
 */

/* ==============================================
   GLOBAL STYLES - สไตล์พื้นฐาน
   ============================================== */

html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

.container-fluid {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

#wrapper, #content-wrapper, #content {
    overflow-x: hidden !important;
}

/* ==============================================
   PAGE HEADERS - หัวข้อหน้า
   ============================================== */

.page-header {
    background: linear-gradient(135deg, #1cc88a 0%, #36b9cc 50%, #4e73df 100%);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0.75rem;
    color: white;
    animation: slideInFromLeft 0.8s ease-out;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(28, 200, 138, 0.3);
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: shimmer 3s infinite;
}

/* ==============================================
   CARDS - การ์ด
   ============================================== */

.card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
}

.search-form-card {
    background: linear-gradient(135deg, #f8fffe 0%, #f0fffe 100%);
    border-left: 4px solid #1cc88a;
    max-width: 100%;
}

.result-card {
    border-left: 4px solid #36b9cc;
    background: linear-gradient(135deg, #f8fdff 0%, #f0fcff 100%);
    max-width: 100%;
}

.card-header {
    max-width: 100%;
    overflow-x: hidden;
}

.card-header .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==============================================
   FORMS - ฟอร์ม
   ============================================== */

.form-control {
    border-radius: 10px;
    border: 2px solid #e3f2fd;
    transition: all 0.3s ease;
    max-width: 100%;
    width: 100%;
}

.form-control:focus {
    border-color: #1cc88a;
    box-shadow: 0 0 0 0.2rem rgba(28, 200, 138, 0.25);
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    max-width: 100%;
}

/* ==============================================
   ICONS & BADGES - ไอคอนและป้าย
   ============================================== */

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-lg {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* ==============================================
   ANIMATIONS - แอนิเมชั่น
   ============================================== */

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

@keyframes fadeIn {
    0% { 
        opacity: 0; 
        transform: translateY(-10px);
        filter: blur(5px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
        filter: blur(0px);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ==============================================
   GRADIENT BACKGROUNDS - พื้นหลังไล่สี
   ============================================== */

.bg-gradient-primary {
    background: linear-gradient(to bottom, #4e73df, #224abe);
}

.bg-gradient-info {
    background: linear-gradient(to bottom, #1cc88a, #36b9cc);
}

.bg-gradient-warning {
    background: linear-gradient(to bottom, #f6c23e, #dda20a);
}

.bg-gradient-success {
    background: linear-gradient(to bottom, #1cc88a, #13855c);
}

/* ==============================================
   RESPONSIVE DESIGN - การตอบสนอง
   ============================================== */

@media (max-width: 576px) {
    .page-header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
}

/* ==============================================
   PRINT STYLES - สไตล์การพิมพ์
   ============================================== */

@media print {
    .page-header {
        background: #4e73df !important;
        color: white !important;
    }
}

/* ==============================================
   PAGE HEADER BUTTON OVERRIDES - ปุ่มใน page-header เท่านั้น
   ============================================== */

/* Page header buttons - force warning style and large size */
.page-header .btn {
    background-color: #f6c23e !important;
    border-color: #f6c23e !important;
    color: #fff !important;
    padding: 0.5rem 1rem !important;
    font-size: 1.25rem !important;
    line-height: 1.5 !important;
    border-radius: 0.3rem !important;
}

.page-header .btn:hover {
    background-color: #dda20a !important;
    border-color: #d39e00 !important;
    color: #fff !important;
}

.page-header .btn:focus,
.page-header .btn.focus {
    background-color: #dda20a !important;
    border-color: #d39e00 !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.2rem rgba(246, 194, 62, 0.5) !important;
}

.page-header .btn:not(:disabled):not(.disabled):active,
.page-header .btn:not(:disabled):not(.disabled).active {
    background-color: #d39e00 !important;
    border-color: #c69500 !important;
    color: #fff !important;
}

.page-header .btn:not(:disabled):not(.disabled):active:focus,
.page-header .btn:not(:disabled):not(.disabled).active:focus {
    box-shadow: 0 0 0 0.2rem rgba(246, 194, 62, 0.5) !important;
}

/* Note: All other button styling removed - using sb-admin-2.min.css defaults only */