/*
======================================================================
KICKOFF PRO CHILD - Premium Textures & Motion Effects
Bright Football Portal - No Dark Colors
======================================================================
*/

/* =====================================================================
   PREMIUM TEXTURE SYSTEM - Light & Refined
   ===================================================================== */

/* Card Borders - Light & Soft */
.kp-card,
.kp-match-card,
.kp-league-card,
.kp-stat-card,
.card,
article {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(226, 232, 240, 0.2);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.2s ease-out;
}

.kp-card:hover,
.kp-match-card:hover,
.kp-league-card:hover,
.kp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22, 93, 255, 0.1);
}

/* Premium Gradient Backgrounds */
.kp-gradient-primary {
    background: linear-gradient(135deg, #F0F5FF, #E8EEFF);
}

.kp-gradient-card {
    background: linear-gradient(180deg, #FFFFFF, #FAFBFC);
}

/* =====================================================================
   PREMIUM BUTTONS - Light & Refined
   ===================================================================== */

button,
.btn,
.wp-block-button__link,
.elementor-button,
input[type="submit"],
.kp-btn {
    border-radius: 8px;
    transition: all 0.2s ease-out;
    font-weight: 500;
    cursor: pointer;
}

button:hover,
.btn:hover,
.wp-block-button__link:hover,
.elementor-button:hover,
input[type="submit"]:hover,
.kp-btn:hover {
    transform: translateY(-1px);
}

/* Primary Button */
.kp-btn-primary,
.btn-primary,
.wp-block-button__link,
.elementor-button {
    background: #165DFF;
    color: #FFFFFF;
    border: none;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.2);
}

.kp-btn-primary:hover,
.btn-primary:hover {
    background: #0040D6;
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
    transform: translateY(-2px);
}

/* Secondary Button */
.kp-btn-secondary {
    background: #FFFFFF;
    color: #165DFF;
    border: 2px solid #165DFF;
    padding: 0.625rem 1.25rem;
}

.kp-btn-secondary:hover {
    background: #165DFF;
    color: #FFFFFF;
}

/* Accent Button */
.kp-btn-accent {
    background: #FF4D4F;
    color: #FFFFFF;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.2);
}

.kp-btn-accent:hover {
    background: #E63E40;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}

/* =====================================================================
   PREMIUM IMAGES - Clear & Consistent
   ===================================================================== */

img {
    max-width: 100%;
    height: auto;
}

.kp-team-logo,
.kp-league-logo,
.kp-team-logo img,
.kp-league-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.kp-league-icon {
    width: 48px;
    height: 48px;
    background: #F5F7FA;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kp-league-icon img {
    width: 28px;
    height: 28px;
}

/* =====================================================================
   PREMIUM DIVIDERS - Light & Subtle
   ===================================================================== */

hr,
.kp-divider {
    border: none;
    border-top: 1px solid #E2E8F0;
    margin: 1.5rem 0;
}

.kp-divider-gradient {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E2E8F0, transparent);
}

/* =====================================================================
   PREMIUM ANIMATIONS - Light & Smooth
   ===================================================================== */

/* Base transition */
* {
    transition-timing-function: ease-out;
}

/* Card hover - slight lift */
.kp-card:hover,
.kp-match-card:hover,
.kp-league-card:hover,
.kp-stat-card:hover {
    transform: translateY(-2px) scale(1.01);
}

/* Button hover - subtle scale */
button:hover,
.kp-btn:hover,
.btn:hover {
    transform: translateY(-1px) scale(1.02);
}

/* Link hover - color shift */
a:hover {
    color: #0040D6;
}

/* =====================================================================
   SCROLL ANIMATIONS - Fade In
   ===================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.3s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.4s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.4s ease-out forwards;
}

/* Stagger delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* =====================================================================
   LIVE PULSE ANIMATION - Bright & Clear
   ===================================================================== */

.kp-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #FF4D4F;
    color: #FFFFFF;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kp-live-badge .kp-live-dot {
    width: 6px;
    height: 6px;
    background: #FFFFFF;
    border-radius: 50%;
}

@keyframes pulse-live {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.4);
    }
    50% {
        opacity: 0.9;
        box-shadow: 0 0 0 6px rgba(255, 77, 79, 0);
    }
}

.kp-live-badge {
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.kp-live-badge .kp-live-dot {
    animation: blink 1s ease-in-out infinite;
}

/* =====================================================================
   NAVIGATION UNDERLINE ANIMATION
   ===================================================================== */

.kp-nav-menu li a {
    position: relative;
}

.kp-nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #165DFF;
    border-radius: 3px 3px 0 0;
    transition: all 0.2s ease-out;
    transform: translateX(-50%);
}

.kp-nav-menu li a:hover::after,
.kp-nav-menu li a.active::after {
    width: calc(100% - 2rem);
}

/* =====================================================================
   SCROLL REVEAL - Light entrance
   ===================================================================== */

@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease-out;
    }
    
    .reveal-on-scroll.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================================
   TAB SWITCH ANIMATION - Fade
   ===================================================================== */

.kp-tab-content {
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
}

.kp-tab-content.active {
    opacity: 1;
    visibility: visible;
}

/* =====================================================================
   SCORE UPDATE ANIMATION - Smooth
   ===================================================================== */

@keyframes scoreFlash {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #FF4D4F; }
    100% { transform: scale(1); }
}

.kp-score-updated {
    animation: scoreFlash 0.4s ease-out;
}

/* =====================================================================
   NUMBER COUNTUP ANIMATION
   ===================================================================== */

.kp-stat-number {
    display: inline-block;
}

/* =====================================================================
   MARQUEE ANIMATION - Smooth scroll
   ===================================================================== */

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.kp-ticker-content {
    animation: marquee 30s linear infinite;
}

/* =====================================================================
   LOADER ANIMATION - Light
   ===================================================================== */

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

.kp-loader {
    border: 3px solid #F5F7FA;
    border-top: 3px solid #165DFF;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

/* =====================================================================
   MODAL ANIMATION - Fade & Scale
   ===================================================================== */

.kp-modal {
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
}

.kp-modal.show {
    opacity: 1;
    visibility: visible;
}

.kp-modal-content {
    transform: scale(0.95);
    transition: all 0.2s ease-out;
}

.kp-modal.show .kp-modal-content {
    transform: scale(1);
}

/* =====================================================================
   BUTTON PRESS EFFECT
   ===================================================================== */

button:active,
.kp-btn:active,
.btn:active {
    transform: translateY(0) scale(0.98);
}

/* =====================================================================
   FORM INPUT ANIMATIONS
   ===================================================================== */

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
    transition: all 0.2s ease-out;
}

/* =====================================================================
   TOOLTIP ANIMATION - Light
   ===================================================================== */

.kp-tooltip {
    position: absolute;
    background: #1D2129;
    color: #FFFFFF;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
    pointer-events: none;
    z-index: 1150;
}

.kp-tooltip.show {
    opacity: 1;
    visibility: visible;
}

/* =====================================================================
   SCROLLBAR STYLING - Light & Refined
   ===================================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #F5F7FA;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* =====================================================================
   TEXT SELECTION - Brand Colors
   ===================================================================== */

::selection {
    background: rgba(22, 93, 255, 0.2);
    color: #1D2129;
}

/* =====================================================================
   FOCUS STATES - Clear & Visible
   ===================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #165DFF;
    outline-offset: 2px;
}

/* =====================================================================
   PDPA COOKIE CONSENT - Light Design
   ===================================================================== */

#kp-pdpa-banner,
#kp-cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1.5rem;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    display: none;
}

#kp-pdpa-banner.show,
#kp-cookie-consent.show {
    display: block;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.kp-pdpa-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.kp-pdpa-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.kp-pdpa-content {
    flex: 1;
    min-width: 200px;
}

.kp-pdpa-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1D2129;
    margin: 0 0 0.25rem;
}

.kp-pdpa-content p {
    font-size: 0.875rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.kp-pdpa-content a {
    color: #165DFF;
    text-decoration: underline;
}

.kp-pdpa-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.kp-pdpa-actions .kp-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* =====================================================================
   THAI LANGUAGE SUPPORT
   ===================================================================== */

html[lang="th"],
body:lang(th) {
    font-family: 'IBM Plex Sans Thai', 'Kanit', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Thai text line height adjustment */
:lang(th) {
    line-height: 1.7;
}

/* =====================================================================
   RESPONSIVE ANIMATION DISABLE
   ===================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================================
   PRINT STYLES - Clean
   ===================================================================== */

@media print {
    .kp-nav,
    .kp-footer,
    .kp-mobile-bottom-nav,
    .kp-live-ticker,
    #kp-pdpa-banner {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .kp-card {
        box-shadow: none;
        border: 1px solid #E2E8F0;
    }
}

/* =====================================================================
   HIGH CONTRAST MODE SUPPORT
   ===================================================================== */

@media (prefers-contrast: high) {
    :root {
        --kp-border: #000000;
        --kp-text-secondary: #000000;
    }
    
    .kp-card {
        border-width: 2px;
    }
}
