/**
 * Card & Search — available on all themes
 * Applied when options_style=card-search on a dropdown field.
 * Shows top 4 options as cards, rest behind an expandable search panel.
 */

/* ---- Top 4 cards grid ---- */
.tf-cs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.tf-cs-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tf-cs-card:hover {
    border-color: #f08f00;
    background: #fff8ee;
    box-shadow: 0 2px 6px rgba(240,143,0,0.12);
}

.tf-cs-card.tf-cs-active {
    border-color: #f08f00;
    background: #fff8ee;
    box-shadow: 0 0 0 2px rgba(240,143,0,0.25);
}

.tf-cs-card .tf-cs-label {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
}

.tf-cs-card .tf-cs-price {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* ---- Hint bar ---- */
.tf-cs-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0f6ff;
    border: 1px solid #d0e4ff;
    border-radius: 8px;
    font-size: 12px;
    color: #4b6282;
    line-height: 1.4;
}

.tf-cs-hint-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.tf-cs-hint-text {
    flex: 1;
}

.tf-cs-hint-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 16px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 2px;
}

.tf-cs-hint-close:hover {
    color: #64748b;
}

/* ---- Browse all button ---- */
.tf-cs-browse {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}

.tf-cs-browse::before {
    content: '🔍';
    font-size: 13px;
}

.tf-cs-browse:hover,
.tf-cs-browse.tf-cs-browse-open {
    border-color: #d1d5db;
    background: #f3f4f6;
}

/* ---- Expanded panel ---- */
.tf-cs-expanded {
    display: none;
    margin-top: 6px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

/* Search input */
.tf-cs-search {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-bottom: 1.5px solid #e5e7eb;
    background: #f9fafb;
    font-size: 14px;
    color: #111827;
    box-sizing: border-box;
    outline: none;
}

.tf-cs-search:focus {
    background: #fff;
    border-bottom-color: #f08f00;
}

/* Result rows */
.tf-cs-results {
    max-height: 260px;
    overflow-y: auto;
}

.tf-cs-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
    box-sizing: border-box;
}

.tf-cs-result:last-child {
    border-bottom: none;
}

.tf-cs-result:hover {
    background: #fff8ee;
}

.tf-cs-result.tf-cs-active {
    background: #fff8ee;
}

.tf-cs-result .tf-cs-label {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

.tf-cs-result .tf-cs-price {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    margin-left: 8px;
}
