/* SuperChump Autocomplete Styles */

/* Autocomplete wrapper */
.autocomplete-wrapper {
    display: block;
    width: 100%;
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 2px;
    min-width: 200px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
    pointer-events: none;
}

.autocomplete-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

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

/* Primary matches (starts with query) */
.autocomplete-item-primary {
    color: #333;
    font-weight: 500;
}

/* Secondary matches (contains query) */
.autocomplete-item-secondary {
    color: #999;
    font-weight: normal;
}

.autocomplete-item:hover,
.autocomplete-item-active {
    background-color: #f5f5f5;
}

.autocomplete-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 5px 0;
}

/* Tag input container */
.tag-input-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    background: white;
    min-height: 42px;
}

.tag-input-display {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-right: 5px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.4;
}

.tag-badge .tag-remove {
    background: none;
    border: none;
    color: #1976d2;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tag-badge .tag-remove:hover {
    color: #d32f2f;
}

.tag-input-container input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 150px;
    padding: 5px;
    font-size: 14px;
}

/* Rating stars input */
.rating-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 28px;
    color: #ddd;
    transition: color 0.2s;
    line-height: 1;
}

.rating-input label.selected {
    color: #ffd700;
}

.rating-input label:hover {
    color: #ffed4e;
}

/* Month/Year input helper */
.date-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.date-input-group input[type="month"] {
    flex: 1;
    min-width: 150px;
}

.date-input-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

/* Post display styles */
.post-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.post-rating .rating-stars {
    display: flex;
    gap: 2px;
}

.post-rating .star {
    font-size: 20px;
    line-height: 1;
}

.post-rating .star.filled {
    color: #ffd700;
}

.post-rating .star.empty {
    color: #ddd;
}

.post-rating .rating-text {
    color: #666;
    font-size: 14px;
}

.post-context {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.context-badge {
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
}

.post-interaction-date,
.post-location {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.post-interaction-date .icon,
.post-location .icon {
    font-size: 16px;
}

.approximate-badge {
    font-style: italic;
    color: #999;
    font-size: 13px;
}

/* Reply display */
.reply-rating {
    color: #ffd700;
    font-size: 16px;
}

.reply-context {
    color: #888;
    font-size: 13px;
}

.reply-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.reply-details .detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 13px;
}

/* Form styles */
.form-note {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 600px) {
    .tag-input-container input {
        min-width: 100px;
    }

    .date-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .date-input-group input[type="month"] {
        width: 100%;
    }

    .post-context {
        flex-direction: column;
        gap: 8px;
    }

    .reply-details {
        flex-direction: column;
        gap: 8px;
    }
}
