/**
 * Home Category Show - Frontend Styles (dropdown searchable cascata)
 * @author RiparaTa.it
 */

#homecategoryshow {
    width: 100%;
    margin: 30px auto;
    padding: 28px 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

/* Dropdowns row + button inline, centered */
.hcs-dropdowns-row {
    display: flex;
    gap: 28px;
    align-items: flex-end;
    justify-content: center;
}

.hcs-select-wrap {
    width: 260px;
    flex-shrink: 0;
    position: relative;
    transition: opacity 0.25s;
}

/* Disabled state */
.hcs-select-wrap.hcs-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.hcs-select-wrap.hcs-disabled .hcs-search-input {
    background: #f0f0f0;
    cursor: not-allowed;
}

.hcs-select-wrap.hcs-disabled .hcs-select-label {
    color: #aaa;
}

.hcs-select-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #232323;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

/* Dropdown container */
.hcs-dropdown-container {
    position: relative;
}

.hcs-search-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 500;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    height: 48px;
}

.hcs-search-input:focus {
    outline: none;
    border-color: #2fb5d2;
    box-shadow: 0 0 0 3px rgba(47, 181, 210, 0.18);
}

.hcs-search-input::placeholder {
    color: #999;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Dropdown list */
.hcs-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.hcs-dropdown.open {
    max-height: 260px;
    overflow-y: auto;
    opacity: 1;
    pointer-events: auto;
}

.hcs-dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

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

.hcs-dropdown-item:hover {
    background: #f0f7fa;
}

.hcs-dropdown-item.active {
    background: #e8f4f8;
    color: #1a8fa8;
    font-weight: 500;
}

.hcs-dropdown-item.hcs-highlight {
    background: #e0f2f7;
    outline: 2px solid #2fb5d2;
    outline-offset: -2px;
}

.hcs-item-count {
    color: #999;
    font-size: 0.82rem;
    margin-left: 2px;
}

.hcs-no-results,
.hcs-loading {
    padding: 10px;
    color: #999;
    font-style: italic;
    font-size: 0.88rem;
    text-align: center;
}

/* Submit button - inline */
.hcs-btn-wrap {
    flex-shrink: 0;
    align-self: flex-end;
}

.hcs-btn {
    padding: 0 28px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    background: #2fb5d2;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    height: 48px;
    letter-spacing: 0.3px;
}

.hcs-btn:hover:not(:disabled) {
    background: #249ab3;
    box-shadow: 0 2px 8px rgba(36, 154, 179, 0.3);
}

.hcs-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    #homecategoryshow {
        margin: 15px 10px;
        padding: 16px 12px;
    }

    .hcs-dropdowns-row {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hcs-select-wrap {
        width: 100%;
        max-width: 280px;
    }

    .hcs-dropdown.open {
        max-height: 200px;
    }

    .hcs-btn-wrap {
        width: 100%;
        max-width: 280px;
        align-self: center;
        text-align: center;
    }

    .hcs-btn {
        width: 100%;
    }
}
