/* MapTrax v2.4.1.3 - Core Layout Styles */
/* Reset and base styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Top Toolbar - Castle Gap Styling */
.top-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #f5efe8;
    box-shadow: 0 2px 8px rgba(121, 77, 39, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
    border-bottom: 2px solid #b96c28;
}

.toolbar-logo {
    height: 40px;
    margin-right: 10px;
}

.toolbar-brand {
    font-weight: 700;
    font-size: 18px;
    color: #7a4d27;
    letter-spacing: 0.5px;
    margin-right: 20px;
    white-space: nowrap;
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 20px;
    border-right: 2px solid rgba(185, 108, 40, 0.2);
}

.toolbar-section:last-child {
    border-right: none;
    margin-left: auto;
}

.toolbar-label {
    color: #7a4d27;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.toolbar-select {
    padding: 8px 12px;
    border: 2px solid #b96c28;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    color: #7a4d27;
    cursor: pointer;
    font-weight: 500;
    min-width: 250px;
}

/* Custom Dropdown with Delete Icons */
.custom-dropdown {
    position: relative;
    min-width: 250px;
}

.dropdown-selected {
    padding: 8px 12px;
    border: 2px solid #b96c28;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    color: #7a4d27;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-selected:hover {
    background: #f5efe8;
}

.dropdown-arrow {
    margin-left: 10px;
    font-size: 10px;
    transition: transform 0.2s;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #b96c28;
    border-radius: 6px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(121, 77, 39, 0.2);
}

.dropdown-list.open {
    display: block;
}

.dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    color: #7a4d27;
    font-size: 13px;
    transition: background 0.2s;
    border-bottom: 1px solid #f0e6db;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f5efe8;
}

.dropdown-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dropdown-item-text {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-item-meta {
    font-size: 11px;
    color: #a08567;
    font-weight: 400;
    line-height: 1.3;
}

.dropdown-item-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.dropdown-action-icon {
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    color: #7a4d27;
    opacity: 0.55;
    line-height: 1;
}

.dropdown-action-icon:hover {
    background: #e8dccb;
    opacity: 1;
}

.dropdown-action-icon.delete-btn:hover {
    background: #dc3545;
    color: white;
    opacity: 1;
}

/* Legacy .dropdown-delete selector — kept in case anything else uses it */
.dropdown-delete {
    color: #dc3545;
    font-size: 14px;
    padding: 4px 8px;
    margin-left: 8px;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
}

.dropdown-delete:hover {
    background: #dc3545;
    color: white;
}

.dropdown-search {
    padding: 8px 10px;
    background: #fafafa;
    border-bottom: 1px solid #e0d4c2;
    position: sticky;
    top: 0;
    z-index: 2;
}

.dropdown-search-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d4c5b0;
    border-radius: 4px;
    font-size: 12px;
    box-sizing: border-box;
    background: white;
    color: #7a4d27;
}

.dropdown-search-input:focus {
    outline: none;
    border-color: #b96c28;
    box-shadow: 0 0 0 2px rgba(185, 108, 40, 0.15);
}

.dropdown-empty {
    padding: 20px 12px;
    text-align: center;
    color: #a08567;
    font-size: 12px;
    font-style: italic;
}

/* Drag-and-drop overlay for project file imports */
.project-drop-indicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(121, 77, 39, 0.85);
    z-index: 10000;
    pointer-events: none;
    align-items: center;
    justify-content: center;
    animation: dropFadeIn 0.15s ease-out;
}

.project-drop-indicator.visible {
    display: flex;
}

@keyframes dropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.project-drop-message {
    background: white;
    border: 3px dashed #b96c28;
    border-radius: 12px;
    padding: 40px 60px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.project-drop-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.project-drop-title {
    font-size: 18px;
    font-weight: 600;
    color: #7a4d27;
    margin-bottom: 4px;
}

.project-drop-hint {
    font-size: 13px;
    color: #a08567;
}

.toolbar-button {
    padding: 8px 16px;
    background: #b96c28;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.toolbar-button:hover {
    background: #a96932;
    transform: translateY(-1px);
}

.toolbar-version {
    color: #a96932;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(185, 108, 40, 0.1);
    border-radius: 4px;
}

/* PLSS State Dropdown */
.plss-dropdown {
    position: relative;
}

.plss-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.plss-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    max-height: 400px;
    background: white;
    border: 2px solid #b96c28;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(121, 77, 39, 0.2);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.plss-dropdown-menu.open {
    display: block;
}

.plss-menu-header {
    padding: 10px 12px;
    font-weight: 600;
    color: #794500;
    background: #f5efe8;
    border-bottom: 1px solid #ddd;
}

.plss-menu-actions {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.plss-menu-actions button {
    flex: 1;
    padding: 4px 8px;
    font-size: 11px;
    border: 1px solid #b96c28;
    background: white;
    color: #b96c28;
    border-radius: 4px;
    cursor: pointer;
}

.plss-menu-actions button:hover {
    background: #b96c28;
    color: white;
}

.plss-state-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 0;
}

.plss-state-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.1s;
}

.plss-state-item:hover {
    background: #f5efe8;
}

.plss-state-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #b96c28;
}

.plss-state-item label {
    flex: 1;
    cursor: pointer;
    font-size: 13px;
}

.plss-state-item .state-abbr {
    font-weight: 600;
    color: #794500;
    width: 30px;
}

.plss-vector-option {
    padding: 10px 12px;
    border-top: 1px solid #ddd;
    background: #e8f0e8;
}

.plss-vector-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    font-size: 13px;
}

.plss-vector-label input {
    margin-right: 6px;
}

.plss-vector-label span {
    display: flex;
    align-items: center;
}

.plss-vector-label small {
    color: #666;
    font-size: 11px;
    margin-left: 22px;
    font-style: italic;
}

.plss-menu-footer {
    padding: 8px 12px;
    border-top: 1px solid #ddd;
    background: #f5efe8;
}

.plss-apply-btn {
    width: 100%;
    padding: 8px 16px;
    background: #b96c28;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.plss-apply-btn:hover {
    background: #a96932;
}

/* Oil Price Ticker */
.oil-ticker-section {
    padding-right: 15px;
}

.oil-ticker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    white-space: nowrap;
}

.oil-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.oil-ticker-label {
    color: #7a4d27;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.oil-ticker-price {
    font-weight: 700;
    font-size: 13px;
    color: #7a4d27;
    font-variant-numeric: tabular-nums;
}

.oil-ticker-price.up {
    color: #28a745;
}

.oil-ticker-price.down {
    color: #dc3545;
}

.oil-ticker-arrow {
    font-size: 10px;
}

.oil-ticker-arrow.up {
    color: #28a745;
}

.oil-ticker-arrow.down {
    color: #dc3545;
}

.oil-ticker-link {
    text-decoration: none;
    cursor: pointer;
}

.oil-ticker-link:hover {
    opacity: 0.75;
}

.oil-ticker-divider {
    color: rgba(185, 108, 40, 0.3);
    font-size: 14px;
    margin: 0 2px;
}

.oil-ticker-refresh {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.3s;
    line-height: 1;
}

.oil-ticker-refresh:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.oil-ticker-refresh.spinning {
    animation: oil-ticker-spin 0.8s linear;
}

@keyframes oil-ticker-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.oil-ticker-timestamp {
    color: #a96932;
    font-size: 10px;
    font-style: italic;
    opacity: 0.7;
}

.oil-ticker-section.hidden {
    display: none;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
}
