/* =========================================
   1. VARIABLES & THEME
   ========================================= */
   :root {
    /* Professional Palette */
    --matej-bg: #eef2ff;       /* Indigo-50 */
    --matej-border: #c7d2fe;   /* Indigo-200 */
    --matej-text: #3730a3;     /* Indigo-800 */

    --zuzka-bg: #fff1f2;       /* Rose-50 */
    --zuzka-border: #fecdd3;   /* Rose-200 */
    --zuzka-text: #9f1239;     /* Rose-800 */

    --pot-bg: #f0fdf4;         /* Green-50 */
    --pot-text: #166534;       /* Green-800 */
    
    --target-bg: #ecfdf5;      /* Emerald-50 */
    --target-text: #065f46;    /* Emerald-800 */
}

/* =========================================
   2. GLOBAL LAYOUT & PWA BEHAVIOR
   ========================================= */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    
    /* Disable Text Selection (App Feel) */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    /* Prevent iOS Bounce / Elastic Scrolling on the whole page */
    overscroll-behavior-y: none;
    overflow: hidden; 

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8fafc; /* Light Slate Background */
    color: #334155;
}

/* Allow the actual app container to scroll naturally */
#app {
    height: 100%;
    width: 100%;
    overflow-y: auto; /* Scrollable content */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

/* Re-enable text selection for inputs so you can type */
input, textarea, .form-control {
    -webkit-user-select: text !important;
    user-select: text !important;
}

/* =========================================
   3. COMPONENT STYLES
   ========================================= */

/* Cards */
.card {
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

/* Dynamic Result Card Colors */
.bg-matej-subtle { background-color: var(--matej-bg); color: var(--matej-text); border: 1px solid var(--matej-border); }
.bg-zuzka-subtle { background-color: var(--zuzka-bg); color: var(--zuzka-text); border: 1px solid var(--zuzka-border); }

/* Column Specifics */
.card-matej { background-color: var(--matej-bg); }
.text-matej { color: var(--matej-text); }
.badge-matej { background-color: var(--matej-text); color: white; }

.card-zuzka { background-color: var(--zuzka-bg); }
.text-zuzka { color: var(--zuzka-text); }
.badge-zuzka { background-color: var(--zuzka-text); color: white; }

/* Stats Badges */
.stat-box {
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
}
.stat-pot { background-color: var(--pot-bg); color: var(--pot-text); }
.stat-target { background-color: var(--target-bg); color: var(--target-text); }

/* Inputs */
.form-control {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    font-size: 16px; /* Prevents zoom on focus in iOS */
}
.form-control:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    border-color: #c7d2fe;
}

/* Buttons */
.btn-primary { background-color: var(--matej-text); border-color: var(--matej-text); }
.btn-danger { background-color: var(--zuzka-text); border-color: var(--zuzka-text); }

/* Switch Styling */
.mode-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    cursor: pointer;
}

/* =========================================
   4. ROTATION LOCK OVERLAY
   ========================================= */
#rotate-lock-overlay {
    display: none;
}

@media screen and (orientation: landscape) {
    #rotate-lock-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #C1B09C; 
        z-index: 99999;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: white;
        text-align: center;
    }

    /* Hide the app content when rotated */
    #app { display: none; }
}

/* =========================================
   5. ERROR UI (Standard Blazor)
   ========================================= */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ... existing css ... */

/* UPDATE TOAST NOTIFICATION */
.update-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px); /* Start hidden below screen */
    
    background-color: #334155; /* Dark Slate */
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
    min-width: 280px;
}

/* Class added via JS to slide it up */
.update-toast.show {
    transform: translateX(-50%) translateY(0);
}