/* Keep dropdown below the input */
.feeds_widget {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Dropdown items */
.feeds_widget li {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.feeds_widget li:hover {
    background: #f1f1f1;
}

.feeds-left {
    margin-right: 10px;
}

/* Filter card styling */
.card .body {
    padding: 1rem;
}

#periodSelect,
#yearSelect,
#monthSelect {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#periodSelect:focus,
#yearSelect:focus,
#monthSelect:focus,
#startDate:focus,
#endDate:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 5px rgba(66, 165, 245, 0.5);
}

/* Weekly date picker container */
#weekDiv {
    position: relative;
}

/* Add dropdown-like appearance for select elements */
select.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg viewBox='0 0 4 5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 0L0 2h4L2 0zm0 5L0 3h4l-2 2z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    background-size: 0.65rem auto;
    padding-right: 2rem;
    cursor: pointer;
}

/* Max width for selects for better alignment */
#yearDiv select,
#monthDiv select {
    max-width: 120px;
}

/* Label spacing */
.card .body h6 {
    margin-bottom: 0.5rem;
}

/* Small text for weekly hint */
#weekDiv small {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 0.85rem;
}

/* Make selects and date inputs inline nicely */
.d-flex .form-select,
.d-flex .form-control {
    min-width: 120px;
}

/* Weekly hint below date inputs */
#weekHint {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #777;
}
/* Make inputs horizontal by default, wrap vertically on small screens */
@media (max-width: 576px) {
    #weekDiv {
        flex-direction: column !important;
    }
    #weekDiv input {
        width: 100% !important;
    }
}

@media (min-width: 577px) {
    #weekDiv input {
        width: auto; /* default width */
    }
}

.flex-gap > * {
    margin-right: 10px;
}
.flex-gap > *:last-child {
    margin-right: 0;
}
