.dropdown {
    position: relative;
    width: 220px;
    font-size: 16px;
    font-family: sans-serif;
}

.dropdown-wide {
    width: 300px;
}

.dropdown-selected {
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.dropdown-selected.error {
    border-color: #ff4444;
    background-color: #fff8f8;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.2);
}

.dropdown-selected.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.dropdown-selected::after {
    content: "▾";
    font-size: 14px;
    color: #666;
}

.dropdown-selected.error::after {
    color: #ff4444;
}

.dropdown-selected:hover {
    border-color: #888;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.dropdown-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 6px;
    border: 2px solid #ccc;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: fadeIn 0.2s ease;
    z-index: 10;
}

.dropdown.dropdown-up .dropdown-options {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 6px;
}

.dropdown-options div {
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-options div:hover {
    background: #f0f0f0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
