/* ===== טבלת עסקים ===== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.businesses-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.businesses-table thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
}

.businesses-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

.businesses-table tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: background-color 0.2s;
}

.businesses-table tbody tr:hover {
    background-color: var(--gray-50);
}

.businesses-table td {
    padding: 0.75rem 1rem;
    text-align: right;
    vertical-align: middle;
}

.logo-cell {
    text-align: center !important;
    width: 70px;
}

.social-cell {
    white-space: nowrap;
}

.social-icon {
    display: inline-block;
    margin: 0 0.25rem;
    color: var(--primary-blue);
    font-size: 1.2rem;
    transition: transform 0.2s, color 0.2s;
}

.social-icon:hover {
    transform: scale(1.2);
    color: var(--primary-blue-dark);
}

.actions-cell {
    white-space: nowrap;
    text-align: center !important;
}

.action-btn {
    margin: 0 0.25rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

/* ===== Modal לצפייה בפרטי עסק ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 1000px;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 2rem;
}

.modal-logo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto 1.5rem;
    display: block;
    box-shadow: var(--shadow-md);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item strong {
    color: var(--primary-blue);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-item span,
.detail-item p {
    color: var(--gray-700);
    font-size: 1rem;
}

.detail-item p {
    margin: 0;
    line-height: 1.6;
}

.social-links-modal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-link-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 8px;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.social-link-detail:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .businesses-table {
        min-width: 0;
    }

    .businesses-table thead {
        display: none;
    }

    .businesses-table,
    .businesses-table tbody,
    .businesses-table tr,
    .businesses-table td {
        display: block;
        width: 100%;
    }

    .businesses-table tr {
        margin: 0 0 0.75rem;
        padding: 0.75rem 1rem;
        border: 1px solid var(--gray-200);
        border-radius: 0.75rem;
        background: #fff;
    }

    .businesses-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.4rem 0;
        border: none;
        white-space: normal;
    }

    .businesses-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--gray-600);
        flex-shrink: 0;
    }

    .actions-cell {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .table-responsive {
        overflow: visible;
        background: transparent;
        box-shadow: none;
    }
}
