/**
 * Machine Search Box - Public Stylesheet
 * Matches design specification: Bold Left Label, 3 Cascading Selects, Red Submit Button
 */

.msb-search-wrapper {
    width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    margin: 15px 0;
}

.msb-search-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #c7d7e8 0%, #dbe7f3 50%, #cad9e9 100%);
    padding: 14px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    gap: 16px;
    flex-wrap: nowrap;
}

.msb-search-label {
    flex-shrink: 0;
}

.msb-label-text {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
    color: #1a365d;
    text-transform: uppercase;
    white-space: nowrap;
}

.msb-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    width: 100%;
}

.msb-select-group {
    flex: 1;
    min-width: 160px;
    position: relative;
}

/* Custom Select Dropdowns */
.msb-select {
    width: 100%;
    height: 44px;
    padding: 0 36px 0 14px;
    font-size: 14px;
    font-weight: 400;
    color: #4a5568;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%3A718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.msb-select:hover:not(:disabled) {
    border-color: #cbd5e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.msb-select:focus:not(:disabled) {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

/* Disabled Dropdown Styling */
.msb-select:disabled {
    background-color: #f7fafc;
    color: #a0aec0;
    border-color: #edf2f7;
    cursor: not-allowed;
    opacity: 0.7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%3Acbd5e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Red Submit Button */
.msb-button-group {
    flex-shrink: 0;
}

.msb-submit-btn {
    height: 44px;
    padding: 0 28px;
    background: #ff0000;
    color: #ffffff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.25);
    white-space: nowrap;
}

.msb-submit-btn:hover {
    background: #e60000;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.35);
    transform: translateY(-1px);
}

.msb-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(255, 0, 0, 0.2);
}

/* Validation shake animation when submitting empty */
.msb-shake {
    animation: msb-shake-anim 0.4s ease-in-out;
}

@keyframes msb-shake-anim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Responsive Breakdown */
@media (max-width: 992px) {
    .msb-search-container {
        flex-direction: column;
        align-items: stretch;
    }
    .msb-search-form {
        flex-direction: column;
    }
    .msb-select-group, .msb-submit-btn {
        width: 100%;
    }
}
