/* Styles specific to gen2missions.ejs */
/* Gen2 Missions Page Specific Styles (moved from style.css) */
#missions-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center cards */
    gap: 25px; /* Increased gap */
    padding: 25px;
}

.mission-card {
    background-color: #2c3e50; /* Darker card background */
    border: 1px solid #34495e; /* Subtle border */
    border-radius: 10px; /* More rounded corners */
    padding: 20px; /* Increased padding */
    width: clamp(320px, 90%, 800px); /* Adjusted for single column, wider cards */
    box-shadow: 0 4px 12px rgba(0,0,0,0.25); /* Softer shadow */
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.mission-card h3 {
    color: #ecf0f1; /* Lighter title text */
    margin-top: 0;
    text-align: center;
    border-bottom: 2px solid #5b8c5a; /* Accent border */
    padding-bottom: 12px;
    margin-bottom: 18px;
    font-size: 1.5em; /* Larger title */
}

.difficulties-wrapper {
    display: flex;
    flex-direction: column; /* Stack difficulties vertically on small screens */
    gap: 18px; /* Increased gap */
    flex-grow: 1;
}

@media (min-width: 768px) { /* Apply row layout for larger screens */
    .difficulties-wrapper {
        flex-direction: row;
        justify-content: space-between;
    }
}

.difficulty-section {
    background-color: #34495e; /* Slightly lighter section background */
    border-radius: 6px; /* Rounded corners for sections */
    padding: 15px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #4a6572;
}

.difficulty-section h4 {
    font-size: 1.25em; /* Larger difficulty title */
    color: #5b8c5a; /* Accent color for difficulty */
    border-bottom: 1px solid #4a6572;
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 12px;
    text-align: center;
}

.difficulty-section ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    flex-grow: 1;
}

.difficulty-section ul li {
    font-size: 0.95em; /* Slightly larger item text */
    line-height: 1.7;
    margin-bottom: 8px; /* Increased spacing */
    color: #bdc3c7; /* Lighter item text */
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed #4a6572; /* Separator for items */
}
.difficulty-section ul li:last-child {
    border-bottom: none;
}

.difficulty-section ul li strong {
    color: #ecf0f1; /* Emphasize item name */
}

.item-chance {
    font-family: 'Courier New', Courier, monospace; /* Monospaced font for percentage */
    color: #e67e22; /* Distinct color for chance */
    font-weight: bold;
    margin-left: 10px; /* Space before chance */
}

#loading-message {
    text-align: center;
    font-size: 1.2em;
    padding: 20px;
    color: #f0f0f0;
}

/* Gen2 Missions Page Controls */
#mission-controls {
    margin-bottom: 25px; /* Increased margin */
    text-align: center;
    display: flex;
    flex-direction: column; /* Stack controls vertically by default */
    align-items: stretch; /* Make controls take full width */
    gap: 15px; /* Consistent gap */
    padding: 15px;
    background-color: #2c3e50; /* Darker background for controls */
    border-radius: 8px;
    max-width: 700px; /* Max width for the control box */
    margin-left: auto;
    margin-right: auto;
}

#mission-controls > div {
    display: flex;
    flex-direction: column; /* Stack label and input/select vertically */
    align-items: stretch; /* Stretch items within the div */
    gap: 8px;
    width: 100%; /* Ensure divs take full width */
}

#mission-controls label {
    color: #ecf0f1; /* Lighter label text */
    font-size: 1em; /* Standardized font size */
    text-align: left; /* Align label text to the left */
    margin-bottom: 0; /* Remove bottom margin as gap handles spacing */
}

#mission-controls select,
#mission-controls input[type="text"] {
    padding: 10px 12px; /* Increased padding */
    font-size: 0.95em;
    background-color: #34495e; /* Input background */
    color: #ecf0f1;
    border: 1px solid #4a6572; /* Subtle border */
    border-radius: 5px;
    width: 100%; /* Make input/select take full width */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

#mission-controls input[type="text"] {
    background-color: #4f4f4f;
    border: 1px solid #6a6a6a;
}

#mission-controls select:hover,
#mission-controls input[type="text"]:hover {
    border-color: #8b7e6e;
}

#mission-controls select:focus,
#mission-controls input[type="text"]:focus {
    outline: none;
    border-color: #5b8c5a;
    box-shadow: 0 0 3px #5b8c5a;
}
.highlighted-item {
    background-color: yellow;
    color: black;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 2px;
}

/* Custom autocomplete dropdown styles */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #34495e;
    border: 1px solid #4a6572;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    color: #ecf0f1;
    border-bottom: 1px solid #4a6572;
}

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

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background-color: #5b8c5a;
    color: #fff;
}

.autocomplete-item.no-results {
    color: #bdc3c7;
    font-style: italic;
    cursor: default;
}

.autocomplete-item.no-results:hover {
    background-color: transparent;
    color: #bdc3c7;
}
