/* Buscador público de archivos por SKU - Hanna Product Downloads PRO */

.hpdp-sku-finder-widget {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.hpdp-sku-finder-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.hpdp-sku-finder-box {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hpdp-sku-finder-input {
    flex: 1 1 260px;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
}

.hpdp-sku-finder-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.hpdp-sku-finder-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hpdp-sku-finder-btn:hover {
    background: #1d4ed8;
}

.hpdp-sku-finder-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hpdp-sku-finder-loading {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.hpdp-sku-finder-loading .hpdp-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    display: inline-block;
    animation: hpdp-sku-spin 0.8s linear infinite;
}

@keyframes hpdp-sku-spin {
    to { transform: rotate(360deg); }
}

.hpdp-sku-finder-results {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hpdp-sku-file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: #f9fafb;
    flex-wrap: wrap;
}

.hpdp-sku-file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: #111827;
}

.hpdp-sku-file-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #e5e7eb;
    color: #374151;
    text-transform: uppercase;
}

.hpdp-type-man { background: #2563eb; color: #fff; }
.hpdp-type-ins { background: #16a34a; color: #fff; }
.hpdp-type-gr  { background: #f59e0b; color: #1f2937; }
.hpdp-type-ft  { background: #0ea5e9; color: #fff; }
.hpdp-type-hds { background: #dc2626; color: #fff; }

.hpdp-sku-file-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hpdp-sku-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: #111827;
    color: #fff !important;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.hpdp-sku-download-btn:hover {
    background: #2563eb;
}

.hpdp-sku-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    color: #374151;
    transition: all 0.2s ease;
}

.hpdp-sku-copy-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.hpdp-sku-copy-btn.hpdp-copied {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.hpdp-sku-finder-empty,
.hpdp-sku-finder-error {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.hpdp-sku-finder-empty {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.hpdp-sku-finder-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.hpdp-icon-search::before { content: "\1F50D"; }
.hpdp-icon-download::before { content: "\2B07"; }
.hpdp-icon-copy::before { content: "\1F4CB"; }
.hpdp-icon-check::before { content: "\2713"; }

@media (max-width: 600px) {
    .hpdp-sku-finder-widget {
        padding: 1rem;
    }

    .hpdp-sku-file-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .hpdp-sku-file-actions {
        width: 100%;
        justify-content: space-between;
    }
}
