/* TP Sync Client — Search Panel Styles */

.tp-search-panel {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}

.tp-search-panel h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a1a2e;
}

.tp-search-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.tp-search-field {
    flex: 1;
    min-width: 180px;
}

.tp-search-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.tp-search-field select,
.tp-search-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
}

.tp-search-field select:focus,
.tp-search-field input:focus {
    border-color: #dc2626;
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.tp-search-btn {
    padding: 10px 24px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.tp-search-btn:hover {
    background: #b91c1c;
}

/* Reference search */
.tp-ref-search {
    position: relative;
    margin-top: 12px;
}

.tp-ref-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.tp-ref-results.active {
    display: block;
}

.tp-ref-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.tp-ref-item:hover {
    background: #f8f9fa;
}

.tp-ref-item-info {
    flex: 1;
}

.tp-ref-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.tp-ref-item-ref {
    font-size: 12px;
    color: #888;
}

.tp-ref-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
}

@media (max-width: 768px) {
    .tp-search-row {
        flex-direction: column;
    }

    .tp-search-field {
        min-width: 100%;
    }
}
