/**
 * Praxis Medikamenten Autofill - Stylesheet
 * Custom Dropdown UI für Contact Form 7 Autocomplete
 */

.wpcf7-form-control-wrap {
    position: relative !important;
}

.praxis-med-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 300px;
    background: #ffffff;
    border: 2px solid #0284c7;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    margin-top: 4px;
    box-sizing: border-box;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Scrollbare Liste */
.praxis-med-list {
    overflow-y: scroll !important;
    overflow-x: hidden;
    box-sizing: border-box;
    scroll-behavior: smooth;
    max-height: 260px;
}

/* Deutliche, auffällige Scrollbar */
.praxis-med-list::-webkit-scrollbar {
    width: 10px !important;
}
.praxis-med-list::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-left: 1px solid #e2e8f0;
}
.praxis-med-list::-webkit-scrollbar-thumb {
    background: #0284c7 !important;
    border-radius: 5px !important;
    border: 2px solid #f1f5f9 !important;
}
.praxis-med-list::-webkit-scrollbar-thumb:hover {
    background: #0369a1 !important;
}

/* 1. Eintrag: "Vorschlag nicht übernehmen" */
.praxis-med-item-dismiss {
    background-color: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
    color: #475569 !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    user-select: none;
    transition: background-color 0.12s ease;
}

.praxis-med-item-dismiss:hover,
.praxis-med-item-dismiss.is-selected {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

.praxis-med-dismiss-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.praxis-med-dismiss-subtitle {
    font-size: 11px;
    font-weight: normal;
    color: #64748b;
    margin-left: 6px;
}

/* Regulärer Listeneintrag */
.praxis-med-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.12s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    box-sizing: border-box;
    background: #ffffff;
}

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

.praxis-med-item:hover,
.praxis-med-item.is-selected {
    background-color: #e0f2fe !important;
}

.praxis-med-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}

.praxis-med-item-meta {
    font-size: 12px;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* Badges für PZN, Darreichung und Stärke */
.praxis-med-badge {
    display: inline-block;
    padding: 2px 7px;
    background: #f1f5f9;
    color: #334155;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.praxis-med-badge-pzn {
    background: #bae6fd;
    color: #0369a1;
    font-weight: 700;
}

.praxis-med-badge-staerke {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

/* Fester Footer-Hinweis bei vielen Treffern */
.praxis-med-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    user-select: none;
}

.praxis-med-scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: praxis-pulse 1.8s infinite ease-in-out;
}

@keyframes praxis-pulse {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(2px); opacity: 0.7; }
}
