/* Minimalist, modern design for the web app */

/* Make sure HTML/body occupy full height */
html, body {
    margin: 100;
    height: 100%;
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background-color: #f9f9f9;
}

/* Let body be a flex container, so .main-content can fill remaining space */
body {
    display: flex;
    flex-direction: column;
}

/* Navbar at the top */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 1rem;
}
.navbar a {
    color: #333;
    margin-right: 1rem;
    text-decoration: none;
    font-weight: 600;
}
.navbar a:hover {
    color: #007BFF;
}

/* The main-content can be flex or block, up to you.
   Here we use flex again so .container can fill the vertical space. */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* let children use the available space */
}
/* Flex container for panes */
.container {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
}

/* Left pane (component pane) */
.component-pane {
    flex-grow: 1;
    min-width: 200px;
    overflow-y: auto;
    background-color: #fff;
    padding: 20px;
    box-sizing: border-box;
}

/* Right pane (map pane) */
.map-pane {
    flex-grow: 1;
    min-width: 200px;
    overflow: hidden;
    background-color: #f9f9f9;
    position: relative;
}

/* Resizer styles */
.resizer {
    width: 5px;
    background-color: #ccc;
    cursor: col-resize;
    z-index: 10;
    position: relative;
}
.resizer:hover {
    background-color: #aaa;
}


/* Leaflet map must fill parent for correct display */
#map {
    width: 100%;
    height: 100%;
}

/* Basic table styling for a clean look */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
table th, table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #eee;
}
table th {
    background-color: #f1f1f1;
    font-weight: 600;
}

/* Simple button styling */
button {
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    background-color: #aaacae;
    border: none;
    color: #000000;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
}
button:hover {
    background-color: #0056b3;
}

/* Optional: style inputs, selects, etc. */
input[type="text"], input[type="number"], select {
    margin: 0.25rem;
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Style for cube selector dropdown */
#cube-selector {
    margin: 1rem 0;
}

/* Table header alignment for clarity */
#imagery-table th {
    text-align: left;
}

/* Delete button styles */
.delete-btn {
    background-color: #ff4d4f;
    color: #fff;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
}
.delete-btn:hover {
    background-color: #d32f2f;
}

/* Filter and Submit button styles */
#apply-filter-btn, #submit-btn {
    background-color: #aaacae;
    color: #000000;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
}
#apply-filter-btn:hover, #submit-btn:hover {
    background-color: #0056b3;
}

.new-pipeline-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
}

.template-section h1 {
    margin-bottom: 0.25rem;
}

.template-hint {
    color: #555;
    margin-top: 0;
}

.template-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.template-btn {
    background-color: #f1f3f5;
    color: #333;
    border: 1px solid #d0d7de;
}

.template-btn:hover {
    background-color: #d7e3fc;
    color: #000;
}

.history-picker {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.yaml-editor {
    width: 100%;
    min-height: 400px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.95rem;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 0.75rem;
    background-color: #fff;
    resize: vertical;
}

.actions {
    display: flex;
    justify-content: flex-end;
}

#send-btn {
    background-color: #2ea043;
    color: #fff;
}

#send-btn:hover {
    background-color: #2c974b;
}

/* Login page styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px);
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 360px;
}

.login-logo {
    width: 80px;
    height: auto;
    margin-bottom: 1.5rem;
}

.login-title {
    margin-bottom: 2rem;
    color: #333;
    font-size: 1.8rem;
    font-weight: 300;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.login-btn {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}

.login-btn:hover {
    background-color: #0056b3;
}
