/* mobile.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden; /* Prevents whole-page scrolling, let frames scroll */
    background-color: #4CAF50;
}

/* Header */
.app-header {
    height: 60px;
    background-color: #4CAF50; /* Green Party Green */
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 10;
    padding-top: env(safe-area-inset-top); /* This handles the notch area */
    margin-top: 0;
}

.nav-icons {
    display: flex;
    gap: 20px;
}

.nav-btn, .filter-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-btn.active, .filter-btn:active {
    color: white;
}

.nav-btn:disabled {
    color: rgba(255, 255, 255, 0.3);
}

.hidden {
    display: none !important;
}

/* Iframes */
.app-main {
    height: calc(100% - 60px);
    position: relative;
}

.view-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Slides up from bottom like native apps */
}

.modal-content {
    background: white;
    width: 100%;
    border-radius: 15px 15px 0 0;
    padding: 20px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
}

.modal-body form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-body label {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.modal-body input, .modal-body select, .modal-body textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px; /* 16px prevents iOS auto-zoom */
}

.btn-save {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    cursor: pointer;
}

/* Filter Modal Specifics */
.filter-body .checkbox-scroll-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 50vh; /* Keeps the list scrollable on small screens */
    overflow-y: auto;
    padding-bottom: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: normal !important; /* Overrides the bold modal-body label */
    font-size: 15px;
    cursor: pointer;
    color: #444;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #4CAF50; /* Colors the checkbox Green on modern browsers */
    flex-shrink: 0;
}