/* ========================================
   FRISE CONTENT SELECTOR
   Composant réutilisable pour la sélection
   d'événements et de périodes dans une frise
   ======================================== */

/* Selectors grid 50/50 */
.selectors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.selector-column {
    min-width: 0;
}

.selector-column > h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selector-column > h3 i {
    color: #0071e8;
}

/* Selector sections */
.selector-section {
    margin-bottom: 24px;
}

.selector-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

/* Search box Apple-like */
.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #86868b;
    font-size: 14px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.search-input:focus {
    outline: none;
    border-color: #0071e8;
    box-shadow: 0 0 0 4px rgba(0, 113, 232, 0.1);
}

.search-input::placeholder {
    color: #86868b;
}

/* Selected items container */
.selected-items-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 50px;
}

.no-selected {
    padding: 20px;
    text-align: center;
    color: #86868b;
    font-size: 14px;
    background: #f5f5f7;
    border-radius: 10px;
    border: 1px dashed #d2d2d7;
}

.selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.08) 0%, rgba(0, 113, 232, 0.12) 100%);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.selected-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

.selected-content {
    flex: 1;
}

.selected-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}

.selected-description {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 4px;
    line-height: 1.3;
}

/* Search results */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: #0071e8;
    background: rgba(0, 122, 255, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.result-content {
    flex: 1;
    margin-right: 12px;
}

.result-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
}

.result-date {
    font-size: 12px;
    color: #86868b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-description {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.4;
    margin-top: 6px;
}

.periode-color-badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.no-results, .search-error {
    padding: 20px;
    text-align: center;
    color: #86868b;
    font-size: 14px;
    background: #f5f5f7;
    border-radius: 10px;
}

.search-error {
    background: #ffebee;
    color: #c62828;
}

/* Responsive */
@media (max-width: 768px) {
    .selectors-grid {
        grid-template-columns: 1fr;
    }

    .search-result-item, .selected-item {
        flex-direction: row;
        align-items: center;
    }

    .result-content, .selected-content {
        margin-right: 12px;
    }

    .search-results {
        max-height: 300px;
    }
}
