/* ==========================================================================
   ThaiTix - Shared Stylesheet
   Color scheme: Thai flag blue + red + white, with modern blue accent
   ========================================================================== */

/* ===== Thai flag color stripe (reusable utility) ===== */
.thaitix-flag-stripe {
    height: 4px;
    background: linear-gradient(90deg, var(--thai-red) 0 33.3%, #fff 33.3% 66.6%, var(--thai-blue) 66.6% 100%);
    border-radius: 2px;
}

/* ===== Red accent link ===== */
.thaitix-link-red {
    color: var(--thai-red);
    font-weight: 600;
    transition: color .15s ease;
}
.thaitix-link-red:hover {
    color: var(--thai-red-dark);
    text-decoration: underline;
}

/* ===== Red divider ===== */
.thaitix-divider-red {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--thai-red), transparent);
    margin: 24px 0;
}

/* ===== Red badge ===== */
.thaitix-badge-red {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: var(--thai-red);
    color: #fff;
}

/* ===== Smooth scroll ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

/* ===== Selection ===== */
::selection {
    background: var(--thai-red);
    color: #fff;
}

/* ===== Loading spinner ===== */
.thaitix-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: thaitix-spin .6s linear infinite;
}
@keyframes thaitix-spin {
    to { transform: rotate(360deg); }
}

/* ===== Fade in animation ===== */
.thaitix-fade-in {
    animation: thaitix-fade-in .4s ease;
}
@keyframes thaitix-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Toast notification ===== */
.thaitix-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    transform: translateX(400px);
    transition: transform .3s ease;
}
.thaitix-toast.show {
    transform: translateX(0);
}
.thaitix-toast.success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}
.thaitix-toast.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}
.thaitix-toast.info {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #93C5FD;
}

/* ===== Skeleton loading ===== */
.thaitix-skeleton {
    background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
    background-size: 200% 100%;
    animation: thaitix-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes thaitix-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Print styles ===== */
@media print {
    .thaitix-header,
    .thaitix-footer,
    .thaitix-btn,
    .thaitix-lang-switch,
    .thaitix-nav {
        display: none !important;
    }
    .thaitix-container {
        max-width: 100% !important;
    }
}
