/* Custom Animations & Overrides */

/* Smooth fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

.anim-shake {
    animation: shake 0.6s cubic-bezier(.36, .07, .19, .97) both;
}

.question-block {
    animation: fadeIn 0.4s ease-out forwards;
    position: relative;
    z-index: 1;
    background-color: #ffffff;
}

.question-block:focus-within,
.question-block.z-elevated {
    z-index: 50;
}

/* Hidden Utility - Tailwind usually has 'hidden' but just in case */
.hidden {
    display: none !important;
}

/* Custom Scrollbar for better aesthetics on Windows */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Star Rating Styles */
.star-rating-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.star-option-row {
    flex: 1;
    min-width: 250px;
    background: white;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.star-option-row:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.star-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.star-btn {
    color: #d1d5db;
    /* Gray-300 */
    transition: all 0.2s ease;
    cursor: default;
    fill: currentColor;
}

button.star-btn {
    cursor: pointer;
}

button.star-btn:hover {
    transform: scale(1.2);
}

.star-btn.active {
    color: #fbbf24;
    /* Amber-400 */
}

button.star-btn.active:hover {
    color: #f59e0b;
    /* Amber-500 */
}

.star-reset-btn {
    margin-left: 0.5rem;
    padding: 0.25rem;
    color: #9ca3af;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.star-reset-btn:hover {
    background-color: #f3f4f6;
    color: #ef4444;
}


.star-custom-input-group {
    margin-top: 5px;
}

/* Search Proposal Dropdowns */
.proposals-dropdown,
.star-proposals-dropdown {
    display: block !important;
    position: absolute !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    z-index: 100 !important;
    border-radius: 0.5rem !important;
    width: 100% !important;
    left: 0 !important;
    top: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-top: 4px !important;
}

.proposals-dropdown.hidden,
.star-proposals-dropdown.hidden {
    display: none !important;
}

.proposals-dropdown div,
.star-proposals-dropdown div {
    background-color: #ffffff !important;
    color: #1f2937 !important;
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid #f3f4f6 !important;
    cursor: pointer !important;
    position: relative !important;
    display: block !important;
}

.proposals-dropdown div:last-child,
.star-proposals-dropdown div:last-child {
    border-bottom: none !important;
}

.proposals-dropdown div:hover,
.star-proposals-dropdown div:hover {
    background-color: #e0e7ff !important;
    /* Indigo-100 */
}