/* Kiosk Mode Pro Frontend Styles - Hebrew Only Version */

/* Always RTL for Hebrew */
html[dir="rtl"],
body.kmp-rtl {
    direction: rtl !important;
}

/* Hide Exit Button Completely */
.kmp-exit-button,
#kmp-exit-button {
    display: none !important;
}

/* Navigation Bar - Fixed Positioning */
.kmp-navigation {
    position: fixed !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 999999;
    transition: none !important;
    direction: rtl !important; /* Force RTL for Hebrew */
}

/* Bottom Navigation - Centered */
.kmp-navigation.kmp-nav-bottom {
    bottom: 0;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    width: auto !important;
    min-width: 320px;
    max-width: 600px;
    border-radius: 0;
    padding: 0;
}

/* Top Navigation */
.kmp-navigation.kmp-nav-top {
    top: 0;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    width: auto !important;
    min-width: 320px;
    max-width: 600px; /* Increased for larger buttons */
    border-radius: 0;
    padding: 0 15px;
}

/* Left Navigation */
.kmp-navigation.kmp-nav-left {
    top: 50% !important;
    bottom: auto !important;
    left: 0;
    right: auto;
    width: 100px; /* Increased for larger content */
    height: auto !important;
    min-height: 320px;
    max-height: 500px;
    transform: translateY(-50%) !important;
    border-radius: 0;
    padding: 15px 0;
}

/* Right Navigation */
.kmp-navigation.kmp-nav-right {
    top: 50% !important;
    bottom: auto !important;
    right: 0;
    left: auto;
    width: 100px; /* Increased for larger content */
    height: auto !important;
    min-height: 320px;
    max-height: 500px;
    transform: translateY(-50%) !important;
    border-radius: 0;
    padding: 15px 0;
}

/* Navigation Container - RTL */
.kmp-nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 10px;
    direction: rtl !important;
    flex-direction: row !important;
}

/* Vertical navigation adjustments */
.kmp-nav-left .kmp-nav-container,
.kmp-nav-right .kmp-nav-container {
    flex-direction: column;
    padding: 10px;
}

/* Navigation Buttons - Flat Design */
.kmp-nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    min-width: 80px;
    height: 61px;
    position: relative;
    direction: ltr; /* Keep button content LTR for icons */
}

/* Button hover effect */
.kmp-nav-button:hover {
    border-bottom: 2px solid currentColor;
}

.kmp-nav-button:active {
    opacity: 0.8;
}

/* Navigation Icons - Set size independently */
.kmp-nav-icon {
    width: 35px !important;
    height: 35px !important;
    fill: currentColor;
    margin-bottom: 5px;
}

/* Navigation Text - Hebrew - Set size independently */
.kmp-nav-text {
    font-size: 15px !important;
    font-weight: 500;
    text-transform: none; /* No uppercase for Hebrew */
    letter-spacing: normal;
    opacity: 0.9;
    direction: rtl; /* Text should be RTL */
    line-height: 1.2;
}

.kmp-nav-button:hover .kmp-nav-text {
    opacity: 1;
}

/* Home Button - Special Style */
.kmp-home-button {
    font-weight: 600;
}

/* Timer - Flat Design with RTL */
.kmp-timer {
    position: fixed !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 10px 15px !important;
    border-radius: 0px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    z-index: 999997 !important;
    border-right: 4px solid !important;
    direction: rtl !important;
    display: none;
    min-width: 200px !important;
}

/* Timer positions - adjusted for better visibility */
.kmp-timer.kmp-timer-bottom-right {
    bottom: 100px !important;
    right: 20px !important;
}

.kmp-timer.kmp-timer-bottom-left {
    bottom: 0px !important;
    right: 137px !important;
}

.kmp-timer.kmp-timer-top-right {
    top: 20px !important;
    right: 20px !important;
}

.kmp-timer.kmp-timer-top-left {
    top: 20px !important;
    left: 20px !important;
}

/* Timer Content */
.kmp-timer-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    direction: rtl;
}

.kmp-timer-value {
    font-weight: 600;
    font-size: 16px;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Timer Progress Bar */
.kmp-timer-progress {
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0;
    margin-top: 8px;
    overflow: hidden;
    position: relative;
}

.kmp-timer-bar {
    height: 100%;
    border-radius: 0;
    transition: width 1s linear, background-color 0.3s ease;
    position: relative;
}

/* Timer color states with pulse animation */
.kmp-timer.red .kmp-timer-bar {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Modals - Flat Design */
.kmp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
}

.kmp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.kmp-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 0;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    direction: rtl; /* RTL for Hebrew content */
}

.kmp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid;
}

.kmp-modal-header h2 {
    font-weight: 600;
    margin: 0;
}

.kmp-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: opacity 0.2s ease;
}

.kmp-modal-close:hover {
    opacity: 1;
}

/* Body adjustments for nav position */
body.kiosk-mode.kmp-nav-left {
    padding-left: 100px;
}

body.kiosk-mode.kmp-nav-right {
    padding-right: 100px;
}

/* Fullscreen mode */
body.kiosk-mode.kmp-fullscreen {
    overflow: hidden;
}

/* Hide cursor */
body.kiosk-mode.kmp-hide-cursor,
body.kiosk-mode.kmp-hide-cursor * {
    cursor: none !important;
}

/* FAQ Accordion - RTL Support */
.kmp-faq-accordion {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
    direction: rtl;
}

.kmp-faq-category {
    margin-bottom: 20px;
}

.kmp-faq-category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid;
    text-align: right;
}

.kmp-faq-item {
    margin-bottom: 10px;
}

.kmp-faq-question {
    width: 100%;
    text-align: right; /* Right align for Hebrew */
    padding: 12px 15px 12px 40px; /* Swap padding for RTL */
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-right: 3px solid transparent; /* Changed from left to right */
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    direction: rtl;
}

.kmp-faq-question:hover {
    background: rgba(0, 0, 0, 0.08);
}

.kmp-faq-question:after {
    content: '+';
    position: absolute;
    left: 15px; /* Changed from right to left */
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.kmp-faq-question.active {
    border-right-color: currentColor;
}

.kmp-faq-question.active:after {
    transform: translateY(-50%) rotate(45deg);
}

.kmp-faq-answer {
    display: none;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: none;
    border-radius: 0;
    margin-top: 0;
    text-align: right;
    direction: rtl;
}

.kmp-faq-answer.active {
    display: block;
}

/* Offline Modal */
.kmp-offline-content {
    text-align: center;
    padding: 40px;
    direction: rtl;
}

.kmp-offline-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .kmp-navigation.kmp-nav-bottom,
    .kmp-navigation.kmp-nav-top {
        min-width: 280px;
        max-width: calc(100% - 20px);
        padding: 0 10px;
    }
    
    .kmp-nav-button {
        min-width: 70px;
        padding: 8px 10px;
        height: 60px;
    }
    
    .kmp-nav-text {
        font-size: 13px !important; /* Slightly smaller on mobile but still readable */
    }
    
    .kmp-nav-icon {
        width: 30px !important;
        height: 30px !important;
    }
    
    .kmp-nav-container {
        gap: 5px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .kmp-navigation {
        border: 2px solid currentColor;
    }
    
    .kmp-nav-button {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .kmp-nav-button,
    .kmp-modal-close,
    .kmp-faq-question:after {
        transition: none;
    }
}