/* ==========================================================================
   JobsZone Importer - Frontend Styles (Mobile First)
   ========================================================================== */

.jzi-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* ===== Buscador Sticky ===== */
.jzi-search-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 12px;
    border: 1px solid #e5e5e5;
}

.jzi-search-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.jzi-search-input,
.jzi-search-location {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}

.jzi-search-input:focus,
.jzi-search-location:focus {
    border-color: #ff6b35;
}

.jzi-search-btn {
    width: 100%;
    padding: 14px;
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

.jzi-search-btn:hover { background: #e55a2b; }

.jzi-filters-toggle {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: #f5f5f5;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
}

/* ===== Chips rápidos ===== */
.jzi-quick-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 4px;
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.jzi-quick-chips::-webkit-scrollbar { display: none; }

.jzi-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    background: #fff;
    border: 1.5px solid #d0d0d0;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}

.jzi-chip:hover,
.jzi-chip.active {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
}

/* ===== Panel Filtros (Bottom Sheet en móvil) ===== */
.jzi-filters-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform .3s ease;
    z-index: 1000;
    max-height: 85vh;
    overflow-y: auto;
}

.jzi-filters-panel.open { transform: translateY(0); }

.jzi-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.jzi-filters-header h3 {
    margin: 0;
    font-size: 18px;
}

.jzi-filters-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.jzi-filter-group {
    margin-bottom: 14px;
}

.jzi-filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.jzi-filter-group select {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
}

.jzi-filters-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.jzi-btn-reset,
.jzi-btn-apply {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.jzi-btn-reset {
    background: #f0f0f0;
    color: #333;
}

.jzi-btn-apply {
    background: #1a8754;
    color: #fff;
}

/* ===== Tarjeta de empleo ===== */
.jzi-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jzi-job-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px;
    transition: box-shadow .2s, transform .2s;
}

.jzi-job-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.jzi-job-title {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
}

.jzi-job-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.jzi-job-title a:hover { color: #ff6b35; }

.jzi-job-company {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.jzi-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.jzi-job-meta span {
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 12px;
}

.jzi-job-salary {
    background: #e8f5e9 !important;
    color: #1a8754 !important;
    font-weight: 600;
}

.jzi-job-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 12px;
}

.jzi-job-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.jzi-btn-view,
.jzi-btn-apply {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s;
}

.jzi-btn-view {
    background: #f5f5f5;
    color: #333;
}

.jzi-btn-apply {
    background: #ff6b35;
    color: #fff;
}

.jzi-btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #25D366;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 20px;
}

.jzi-job-source {
    margin-top: 8px;
    font-size: 11px;
    color: #999;
    text-align: right;
}

/* ===== Estados ===== */
.jzi-loading {
    text-align: center;
    padding: 40px 20px;
}

.jzi-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: jzi-spin 1s linear infinite;
}

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

.jzi-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 12px;
    color: #666;
    font-size: 15px;
}

.jzi-results-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    padding: 0 4px;
}

.jzi-load-more {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 20px auto;
    padding: 14px;
    background: #fff;
    border: 1.5px solid #ff6b35;
    color: #ff6b35;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.jzi-load-more:hover {
    background: #ff6b35;
    color: #fff;
}

/* ===== Desktop ===== */
@media (min-width: 768px) {
    .jzi-search-inputs {
        flex-direction: row;
    }
    .jzi-search-input { flex: 2; }
    .jzi-search-location { flex: 1; }
    .jzi-search-btn { width: auto; padding: 14px 30px; }
    .jzi-search-form {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    .jzi-filters-panel {
        position: static;
        transform: none;
        box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        border-radius: 12px;
        border: 1px solid #e5e5e5;
        max-height: none;
        display: none;
        margin-bottom: 16px;
    }
    .jzi-filters-panel.open { display: block; }
    .jzi-filter-group {
        display: inline-block;
        width: 48%;
        margin-right: 2%;
    }
}
