/* v13 BaseThing - base styling for menubar and UI framework */

/* Menubar styles for maintop grid area */
.maintop {
    background: #f0f0f0; border-bottom: 1px solid #ccc;
    padding: 5px 10px;   font-family: Arial, sans-serif;
    min-height: 30px;
}

.maintop .menubar {
    background: transparent; border: none; padding: 0;
}

.menu {
    display: inline-block; position: relative; margin-right: 20px;
}

.menu-item {
    padding: 5px 10px; cursor: pointer; user-select: none;
    border: 1px solid transparent;
}

.menu-item:hover { background: #e0e0e0; border: 1px solid #999; }

.dropdown {
    position: absolute; top: 100%; left: 0; z-index: 1000;
    background: white;   border: 1px solid #999;
    min-width: 200px;    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.dropdown.hidden { display: none; }

.menu-option {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
}

.menu-option:hover {          background: #f0f0f0;            }
.menu-option:last-child {     border-bottom: none;            }

/* Menu label styling */
.menu-label { font-weight: 500;  color: #333; white-space: nowrap;  }

/* Shortcut key styling */
.shortcut {
    font-size: 0.85em;
    color: #888;
    font-weight: 300;
    margin-left: auto;
    padding-left: 20px;
    white-space: nowrap;
}

.menu-option:hover .shortcut { color: #666; }

/* Menu separators */
.menu-separator {
    height: 1px;
    background: #ddd;
    margin: 4px 0;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 80px;
}

.btn-start {
    background: #4CAF50;
    color: white;
}

.btn-start:hover {     background: #45a049; }
.hidden          {     display: none;       }

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;

    flex-wrap: wrap;
    background: #333;
    border-radius: 5px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px;
/* Generic UI components for applications */
.btn-start.active {
}
    border-radius: 50%;
    cursor: pointer;
}

select {
    padding: 4px 8px;
    background: #555;
    color: white;
    border: 1px solid #666;
    background: #4CAF50;
    border-radius: 3px;

.info-panel {
    margin-top: 20px;
    padding: 15px;
    background: #333;
    border-radius: 5px;
    font-family: monospace;
    font-size: 12px;
}
}
    background: #f44336;
    height: 16px;
    appearance: none;

.btn-reset {
    background: #2196F3;
    color: white;
}

.btn-reset:hover {
    background: #1976D2;
}
    width: 16px;

    width: 120px;
    height: 20px;
    background: #555;
    outline: none;
    border-radius: 10px;
}

input[type="range"]::-webkit-slider-thumb {
input[type="range"] {

/* Content area styling */
#BaseThing {
    padding: 20px; min-height: 400px;
}

/* Responsive adjustments */
@media only screen and (max-width: 600px) {
    .maintop { padding: 3px 3px; } /* Reduce horizontal padding more */
    .menu-item { padding: 3px 4px; font-size: 13px; } /* Reduce menu item padding */
    .menu { margin-right: 6px !important; } /* Reduce menu spacing */
    #BaseThing { padding: 10px; }
}

/* Even more aggressive for very narrow screens */
@media only screen and (max-width: 450px) {
    .maintop { padding: 2px 2px; } /* Minimal padding */
    .menu-item { padding: 2px 3px; font-size: 12px; } /* Smaller padding and font */
    .menu { margin-right: 4px !important; } /* Tighter spacing */
}

/* BaseThing Modal System Styles */
.basething-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.basething-modal-dialog {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    font-family: sans-serif;
}

.basething-modal-header {
    padding: 20px 20px 10px 20px;
    border-bottom: 1px solid #eee;
}

.basething-modal-title {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.basething-modal-content {
    padding: 20px;
    line-height: 1.5;
}

.basething-modal-buttons {
    padding: 10px 20px 20px 20px;
    text-align: right;
    border-top: 1px solid #eee;
}

.basething-modal-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
    font-size: 0.9em;
}

.basething-modal-button.primary {
    background: #007cba;
    color: white;
}

.basething-modal-button.secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.basething-modal-button:hover.primary {
    background: #005a87;
}

.basething-modal-button:hover.secondary {
    background: #e0e0e0;
}

.basething-modal-close {
    background: #4A90E2;
    color: white;
    border: none;
    padding: 0.5em 1.5em;
    margin-left: 1em;
    border-radius: 4px;
    font-size: 1.2em;
    cursor: pointer;
    font-weight: bold;
}

.basething-modal-close:hover {
    background: #357ABD;
}

/* Form elements in modals */
.basething-modal input[type="text"],
.basething-modal input[type="password"],
.basething-modal textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

.basething-modal textarea {
    resize: vertical;
    min-height: 60px;
}

.basething-modal label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
    margin-top: 12px;
}

.basething-modal label:first-child {
    margin-top: 0;
}

/* iOS Safari fallback - inline modal styles */
.basething-inline-modal {
    background: #f9f9f9 !important;
    border: 2px solid #007cba !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    position: relative !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    animation: slideIn 0.3s ease-out;
}

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

/* Mobile-first responsive adjustments */
@media only screen and (max-width: 600px) {
    .basething-modal-dialog {
        width: 95%;
        margin: 10px;
        max-height: 90vh;
    }
    
    .basething-modal-content {
        padding: 15px;
    }
    
    .basething-modal-buttons {
        padding: 10px 15px 15px;
    }
    
    .basething-inline-modal {
        margin: 10px 0 !important;
        padding: 15px !important;
    }
}


