/* 1. ESILEHED */
.game-layout-grid {
    display: flex; justify-content: center; align-items: flex-start; gap: 40px;
    margin-top: 20px; max-width: 1200px; margin-left: auto; margin-right: auto;
}
/* nuppudega päis */
.game-header-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.game-header-row h1 { margin: 20px 8px 10px; color: #787a81; }
.game-buttons-group { display: flex; }

.col-card-stack { width: 280px; display: flex; flex-direction: column; position: relative; z-index: 50; }
.stack-heading { color: #aab; font-size: 15px; margin: 0 0 20px 10px; }

.stack-card {
    background-color: #ACC4DA; padding: 15px 20px; line-height: 1; margin-bottom: -110px;
    height: 160px; border-radius: 12px; color: #333; font-weight: 600; font-size: 15px;
    cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2);
    transition: 0.6s ease; position: relative;
}
.stack-card:hover, .stack-card.active { transform: translateY(-15px); filter: brightness(1.1); z-index: 60; transition: 0.4s ease }

.twin-towers-fixed { display: flex; box-shadow: 0 20px 60px rgba(0,0,0,0.4); background-color: #000; }
.col-middle-fixed, .col-right-fixed { width: 384px; height: 600px; position: relative; overflow: hidden; }
.col-middle-fixed { background-color: #333; color: #aab; padding: 30px; overflow-y: auto; }

.col-middle-fixed h2, .panel-trans h2, .sliding-panel h3 {
    margin: 20px 0 10px; color: #fff; font-family: "PT Sans Narrow", sans-serif !important;
    font-size: 21px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; line-height: 1.2 !important;
}
.col-middle-fixed p, .panel-trans p { line-height: 1.2 !important; font-size:14px; }
.cover-img-fixed { width: 100%; height: 100%; background-size: cover; background-position: center; display: block; }
.panel-trans h2, .panel-trans p, .slide-in-text p, .slide-in-text h3, .sliding-panel h3 {
    color: #333; line-height: 1.2 !important;
}

.sliding-panel {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10;
    transform: translateX(-100%); transition: transform 0.6s ease-in;
    padding: 30px; overflow-y: auto;
}
.sliding-panel.open { transform: translateX(0); }
.panel-est { background-color: #aac; color: #333; }
.panel-trans { background-color: #9191b9; color: #333; }

/* NUPUD */
.btn {
    text-decoration: none; padding: 0 20px; border: 0; border-radius: 30px; letter-spacing: .4px;
    color: #eefb; font-size: 13px; font-weight: 600; text-transform: uppercase;
    box-shadow: 0 6px 12px #0006, 0 0 1px #0005 inset; cursor: pointer; height: 34px; width: fit-content;
    display: inline-flex; align-items: center; margin: 10px 6px 0; transition: all 0.4s ease-in-out;
}
.btn:hover { color:#fff; transform: translateY(-2px);  transition: 0.4s ease-in-out; }
.btn sup { margin: 0 -11px -6px 6px; padding: 10px 7px; border-radius: 10px; background: #fff5; font-size: 12px; color: #0006; }
.btn-blue { background: linear-gradient(45deg, #213264, #3651df, #8e24aa, #213264); background-size: 300% 100%; }
.btn-blue:hover { background-position: 100% 0; box-shadow: 0 6px 12px #35da; }
.btn-green { background: linear-gradient(45deg, #1b5e20, #4caf50, #81c784, #1b5e20); background-size: 300% 100%; }
.btn-green:hover { background-position: 100% 0; box-shadow: 0 6px 12px #3a5a; }
.btn-dark { text-transform: lowercase; background: linear-gradient(45deg, #000, #000, #222, #660, #222,#000); background-size: 300% 100%; }
.btn-dark:hover { background-position: 99% 0; box-shadow: 0 6px 12px #330a; }
.btn-golden { background: linear-gradient(45deg, #ff6d00, #ffad02, #ffff00, #ff6d00); color: #000; background-size: 300% 100%; }
.btn-golden:hover { background-position: 100% 0; box-shadow: 0 6px 12px #960a; color: #000; }
.btn-info { height: 40px; width: 40px; padding: 0; font-size: 16px; font-weight: 100; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.btn-audio { min-width: 88px; }
.btn-big { font-size: 16px; height: 40px; padding: 0 30px; margin: 20px 0 20px auto;}

.panel-close { 
    position: absolute; top: 15px; right: 15px; width: 32px; height: 32px; 
    display: inline-flex; justify-content: center; align-items: center; padding:0;
    border-radius: 50%; background: #74749b;
    cursor: pointer; z-index: 20;
}

.panel-close span {
    font-size: 26px; line-height: 1; display: block; color:#333;
    transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Mõnus vetruv pööre */
    transform-origin: center center;
}
.panel-close:active { background: #fff; }

.panel-close:hover span { color: #d32f2f; transform: rotate(180deg); }
li .btn, p .btn, p .panel-close { vertical-align: top; position: static; margin: 2px; }

.intro-trans-link {
    text-align: right; font-weight: bold; color: #3651df; cursor: pointer;
    font-size: 12px; text-transform: uppercase; transition: .3s; position: absolute; top: 26px; right: 30px;
}
.intro-trans-link:hover { right: 24px; color: #d32f2f; }

/* JUTUD (BLOGI) JA TEKSTILEHED */
.text-content strong { color: #fff; }
.text-content ul{ margin-top: -16px; }
.single-post .entry-content,
.text-content { max-width: 600px; margin: 0 auto; color: #ccc; }

.single-post .entry-content h2,
.single-post .entry-content h3,
.text-content h3 {
    color: #fff; font-family: "PT Sans Narrow", sans-serif !important; text-transform: uppercase; font-weight: 600;
    font-size: 21px; margin: 10px 0 10px -20px; line-height: 1.2; }

.single-post .entry-content p,
.text-content p { line-height: 1.4; font-size: 14px; }

.single-post .entry-content strong,
.text-content strong { color: #fff; font-weight: 600; }

.single-post .entry-content ul,
.text-content ul {
    margin-top: -5px; margin-bottom: 20px; padding-left: 20px;
}


/* 3. VEEBIMÄNGUDE MOOTOR */
@keyframes dropInPage {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}
.mikssest-page-layout {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; align-items: flex-start;
    max-width: 1200px; margin: 0 auto; padding: 20px;
}
.layout-main {
    flex: 1; animation: dropInPage 0.8s ease-out forwards; opacity: 0;
}
.game-header { display: flex; justify-content: space-between; align-items: center; margin: -12px 80px 20px 0;}

/* mängude külgmenüü */
.layout-sidebar { width: 220px; flex-shrink: 0; }
.game-sidebar-container { display: flex; flex-direction: column; gap: 1px; }
.games-toggle { display: none; }

.side-menu-item {
    display: block; position: relative; width: 220px; height: 40px;
    line-height: 40px; background-color: #333; color: #aab;
    font-family: "PT Sans Narrow", sans-serif !important;
    font-size: 16px; font-weight: 600; text-transform: uppercase;
    text-decoration: none; padding-left: 25px; box-sizing: border-box;
    overflow: hidden; transition: all 1.3s ease;
}
.side-menu-item small { font-size: 11px; opacity: 0.7; margin-left: 5px; font-weight: 400; }
.menu-dot { position: absolute; width: 20px; height: 30px; border-radius: 5px; left: -15px; top: 5px; transition: transform 0.3s ease; }
.side-menu-item:hover { background-color: #aab; color: #333; padding-left: 20px; transition: transform 0.3s ease; }
.side-menu-item:hover .menu-dot { transform: scale(1.2); }
.side-menu-item.current-menu-item { background-color: #5f6065; color: #fff; }

/* KAARDID */
.game-card, .choice-card {
    background-color: var(--card-color, #ACC4DA);
    padding: 20px; border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
    color: #333; display: flex; flex-direction: column;
    justify-content: space-between; min-height: 160px;
    cursor: pointer; transition: all 0.8s ease;
    position: relative; overflow: hidden;
    visibility: visible;
}
.choice-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); filter: brightness(1.05); }

/* Klassid animatsioonide jaoks */
.hidden-card { opacity: 0; visibility: hidden; }
.invisible { visibility: hidden !important; opacity: 0 !important; }

/* uue kaardi animatsioon */
@keyframes dropInCard {
    0% { top: 200px; transform: rotateZ(90deg); } 
    100% { top: 0; transform: rotateZ(0deg); }
}
.drop-in-anim {
    animation: dropInCard 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    visibility: visible !important;
}

.text-primary { font-weight: 600; font-size: 16px; line-height: 1.1; margin-bottom: 10px; position: relative; z-index: 2; }
.prefix { color: #1565C0; }
.card-author { font-size: 14px; font-style: italic; text-align: right; margin-top: -8px; position: relative; z-index: 2; }
.text-translation { border-top: 1px solid rgba(0,0,0,0.1); padding-top: 8px; font-size: 13px; line-height: 1.1; margin-top: auto; position: relative; z-index: 2; }

#choices-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
#active-card-area { margin-bottom: 30px; display: flex; justify-content: center; width: 100%; }
.main-card { width: 100%; max-width: 274px; min-height: 160px; font-size: 16px; }

/* MODAL */
.modal-overlay {
    display: flex; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 9999;
    justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active { visibility: visible; opacity: 1; pointer-events: auto; }

.modal-content {
    background: #9191b9; padding: 30px 40px; border-radius: 12px;
    max-width: 600px; width: 96%; position: relative;
    box-shadow: 0 20px 50px #000;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-content { transform: scale(1); }

.modal-primary-full { font-size: 20px; font-weight: 600; line-height: 1.2; color: #333; margin: 30px 0 10px; }
.modal-trans-full { color: #333; border-top: 1px solid #778; padding: 10px; font-size: 14px; }
#modal-buttons-area { display: flex; justify-content: space-between; align-items: center; margin-top:30px; flex-wrap: wrap; gap: 20px; }
.modal-actions-right { display: flex; align-self: flex-end; }

/* TREENER */
.trainer-layout { display: flex; gap: 20px; align-items: flex-start; width: 100%; }
.trainer-cards-area { flex: 2; display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap:12px; }
.trainer-sidebar { flex: 1; background-color: #787a81; box-shadow: inset 0 0 10px rgba(0,0,0,0.05); height: 700px; }
.trainer-sidebar h3 {
    font-family: "PT Sans Narrow", sans-serif !important; padding: 14px;
    text-transform: uppercase; color: #aab; font-size: 16px; font-weight:700;
    background: #333; margin-bottom: 4px; min-width: 240px;
}
#learned-list { height:92%; overflow-y: auto; }
.learned-item {
    background: #333; padding: 10px; margin-bottom: 1px;
    font-size: 14px; line-height: 1.2; color: #aab; cursor: pointer;
    border-left: 4px solid #666; transition: all 1.4s ease;
}
.learned-item:hover { border-left-color: #4CAF50; background: #aab; color:#333; transition: all .6s; }

.game-placeholder {
    width: 100%; max-width: 384px; height: 600px;
    background-color: #213264; background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); color: #fff; text-align: center;
}
.placeholder-text {
    background: rgba(0, 0, 0, 0.6); padding: 20px 40px; border-radius: 50px;
    font-family: "PT Sans Narrow", sans-serif; font-size: 24px; text-transform: uppercase;
    letter-spacing: 2px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.2);
}
.game-placeholder.fade-in { animation: dropInPage 0.8s ease-out forwards; }

.btn-disabled {
    pointer-events: none;
    opacity: 0.4;
    filter: grayscale(100%);
    cursor: default;
}

/* --- KASSA DISAIN --- */
/* PEIDAME MÜRA */
.woocommerce-checkout h3 { display: none !important; }
.woocommerce-additional-fields { display: none !important; }

/* VÄLJAD */
#billing_postcode_field, #billing_city_field { width: 48%; float: left; clear: none; }
#billing_postcode_field { margin-right: 4%; }
.woocommerce form .form-row input.input-text, .select2-container .select2-selection--single { padding: 0 20px 0 10px; height: 44px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: #fff; line-height: 44px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; }

/* PAIGUTUS */
@media (min-width: 1024px) {
    .woocommerce-checkout form.checkout { display: flex; justify-content: space-between; }
    #customer_details { flex: 1; }
    .woocommerce-billing-fields { width: 400px; margin: 50px 30px 0 0; }
    .woocommerce form .password-input, .woocommerce-page form .password-input { max-width: 400px; }
    #order_review_heading, #order_review { flex-shrink: 0; }
    #order_review { 
        width: 600px; background: #1a1a1a;
        padding: 20px 30px; border-radius: 8px; border: 1px solid #333;  z-index: 100; max-height: calc(100vh - 120px); overflow-y: auto; 
    }
}
.select2-search, .select2-results { background: #222; padding-left: 10px;  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8); }
.woocommerce table.shop_table tfoot th { font-weight: 600 !important; border-top: 1px solid #333 !important; }
.makecommerce-pickuppoint-wrapper { position: relative; height: 60px; }
.makecommerce-shipping-container { position: absolute; left: -6px; }
.mcSelectContainer { max-width: fit-content !important;}
.mcShippingSelectDropdown { max-width: 480px; background: #222 !important; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8); }
.makecommerce-payment-methods .col-6 { width: 25% }
.woocommerce table.shop_table th { font-weight: 600; padding: 0 12px; line-height: 1; }
tr.bonus-row td { color: #4caf50 !important; font-weight: 600; } /* BOONUSRIDA KASSAS */
.makecommerce-payment-methods .row>* { margin-top: 0; }
.woocommerce-checkout #payment ul.payment_methods { padding: 10px 16px 0 !important; border: 0 !important; }

/* ALERTIDE MODAAL */
.woocommerce-notices-wrapper {
    position: fixed !important; 
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2147483647 !important;
    background: rgba(0, 0, 0, 0.7); 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    pointer-events: none; opacity: 0; transition: opacity 0.3s ease;
}
.woocommerce-notices-wrapper:not(:empty) { pointer-events: auto; opacity: 1; }
.woocommerce-notices-wrapper ul,
.woocommerce-notices-wrapper .woocommerce-message, 
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
    width: 90%; max-width: 500px;
    background: rgba(26, 26, 26, 0.95) !important; /* Kasti taust ka natuke läbipaistev */
    color: #fff !important;
    padding: 30px 40px; border-radius: 8px; box-shadow: 0 20px 60px #000;
    border: 1px solid #444; list-style: none !important; margin: 0 0 20px 0;
    text-align: center; font-size: 16px; line-height: 1.6;
}
.woocommerce-message { border-top-color: #4caf50 !important; } /* Roheline edu korral */
/* veateated modaali lõpp */

.woocommerce { display: flex; color: #aab; }
.woocommerce h2 { font-family: "PT Sans Narrow", sans-serif !important; margin: 30px 10px -10px; font-size: 26px; }
.woocommerce-account .woocommerce-MyAccount-navigation { position: relative; left: 0; width:300px !important; }
.woocommerce-checkout #payment { margin: 0 -10px; }
.woocommerce-error::before, .woocommerce-info::before, .woocommerce-message::before { display: none !important; } /* Kaotame ikoonid */
.woocommerce form.checkout_coupon, .woocommerce form.login, .woocommerce form.register { border: 1px solid #363636 !important; background: #191919; }
.woocommerce-EditAccountForm button { background: #333 !important; font-weight: 300 !important; text-transform: none !important; }
.woocommerce button.button[type="submit"] { margin: 20px 0 12px 66%; border-radius: 30px; color: #aaa; padding: 10px 20px; font-size: 14px; }

@keyframes slideDown { from { top: -100px; opacity: 0; } to { top: 20px; opacity: 1; } }
/* Tõstame Sinu Võit ja Kokku fondid esile */
tr.order-total td { font-size: 24px; color: #fff; }
tr.order-savings td { color: #4caf50; font-size: 18px; }

/* Vormi teadete stiil */
.contact-success {
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    color: #4caf50;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    position: absolute;
    left: 50%;
    bottom: 200px;
}

.contact-error {
    background-color: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* See teeb inputi ääre punaseks sujuvalt */
.mikssest-contact-form input, 
.mikssest-contact-form textarea {
    transition: border-color 0.3s ease;
}
/* --- GLOBAALNE KÜLGPANEEL (Pood + Jutud) --- */
.himalaya-shop-sidebar { 
    position: fixed; top: 0; right: -420px; width: 380px; height: 100vh; 
    background: #222; z-index: 999999; 
    box-shadow: -10px 0 30px rgba(0,0,0,0.6); 
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
    display: flex; flex-direction: column; padding: 20px; 
    box-sizing: border-box; overflow-y: auto; color: #ddd; 
    border-left: 1px solid #444; font-family: 'Source Sans 3', sans-serif; 
}
.wide-sidebar { right: -600px; width: 580px; }
.himalaya-shop-sidebar.open { right: 0; }

@media (max-width: 480px) { 
    .himalaya-shop-sidebar, .wide-sidebar { width: 100%; right: -110%; } 
}

/* --- JUTUD / BLOGI NIMEKIRI --- */
.jutud-container { max-width: 600px; margin: 40px auto; padding: 20px; }
.jutt-item {
    background: #252525; border-bottom: 1px solid #333; padding: 20px;
    cursor: pointer; display: flex; align-items: center; transition: all 0.3s ease;
    border-radius: 4px; margin-bottom: 10px;
}
.jutt-item:hover { background: #333; transform: translateX(10px); border-left: 4px solid #4caf50; }
.jutt-date { font-size: 12px; color: #777; margin-right: 15px; min-width: 70px; }
.jutt-title { font-family: "PT Sans Narrow", sans-serif; font-size: 18px; color: #ddd; text-transform: uppercase; flex-grow: 1; font-weight: 600; margin-right: 6px; }
.jutt-arrow { color: #444; font-weight: bold; }
.jutt-item:hover .jutt-title { color: #fff; }
.jutt-item:hover .jutt-arrow { color: #4caf50; }

/* JUTUD PANEELI SISU */
.sidebar-jutt-title { color: #fff; font-family: "PT Sans Narrow", sans-serif; font-size: 28px; margin-bottom: 20px; letter-spacing: 1px; }
.sidebar-jutt-date { color: #666; font-size: 13px; margin-bottom: 30px; border-bottom: 1px solid #333; padding-bottom: 20px; }
.sidebar-jutt-body { color: #aab; }
.sidebar-jutt-body p { margin-bottom: 15px; }
.sidebar-jutt-body strong { color: #fff; }
.sidebar-jutt-body img { max-width: 100%; height: auto; border-radius: 4px; margin: 10px 0; }

@media (max-width: 1024px) {
    .main-navigation:not(.slideout-navigation) .main-nav > ul { display: none; }
    .main-navigation .menu-toggle { display: block; width: auto; float: right; }
    .main-navigation .inside-navigation { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
    .main-navigation.toggled .main-nav > ul { display: block; width: 100%; padding-top: 10px; }
    .main-navigation .main-nav ul li:hover > ul, .main-navigation .main-nav ul li.sfHover > ul { display: none; }
    .main-navigation.toggled .main-nav ul li:hover > ul, .main-navigation.toggled .main-nav ul li.sfHover > ul { display: block; }
    .games-toggle {
        display: block; position: fixed; right: 0; top: 76px; background-color: #333; color: #dde; padding: 10px 20px; border-radius: 30px 0 0 30px;
        font-weight: 600; text-transform: uppercase; font-size: 13px; box-shadow: -2px 2px 10px rgba(0,0,0,0.2);
        transition: right 0.6s cubic-bezier(0.25, 1, 0.5, 1); min-width: 100px;
    }
    .layout-sidebar { width: 0 !important; padding: 0 !important; overflow: visible; }
    #sidebar-container.game-sidebar-container {
        position: fixed; top: 120px; right: -240px; height: calc(100vh - 150px); background-color: #333; overflow: auto;
        transition: right 0.6s cubic-bezier(0.25, 1, 0.5, 1); box-shadow: -5px 0 15px rgba(0,0,0,0.5); display: block; z-index: 10;
    }
    #sidebar-container.game-sidebar-container.open { right: 0; }
    .layout-main { flex: auto; }
    .has-inline-mobile-toggle #site-navigation.toggled { margin-top: 0 !important; }
    .main-navigation.toggled .main-nav { position: fixed; right: 0; top: 60px; }
}

@media (max-width: 768px) {
    .mikssest-page-layout { flex-direction: column; align-items: center; gap: 10px; }
    #choices-grid { grid-template-columns: 1fr; gap: 4px; }
    .trainer-cards-area { flex: 1; grid-template-columns: 1fr; gap:4px; }
    .game-card, .choice-card, .main-card { min-height:0; max-width: 100%; }
    .layout-sidebar { width: 100%; display: flex; flex-direction: column; align-items: center; }
    .trainer-layout { flex-direction: column; }
    .trainer-sidebar { width: 100%; height: auto; min-height: 300px; }
    .trainer-cards-area { width: 100%; }
    .game-layout-grid { flex-direction: column; align-items: center; }
    .col-card-stack { width: 100%; max-width: 384px; flex-direction: row; flex-wrap: wrap; gap: 10px; margin-bottom: -50px; }
    .stack-card { margin-bottom: 0; height: auto; flex: 1 1 auto; padding: 20px; line-height: 1.4; }
    .twin-towers-fixed { flex-direction: column; width: 100%; max-width: 384px; }
    .col-middle-fixed, .col-right-fixed { width: 100%; }
    .stack-heading { width: 100%; text-align: center; border: none; margin-bottom: 5px; }
    .game-header {margin: -20px 50px 10px -20px; }
}