/* Delivery Cliente - Estilo App */
.pa-delivery-home {
    min-height: 100vh;
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pa-delivery-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pa-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.pa-app-title {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pa-app-subtitle {
    font-size: 1.1rem;
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-weight: 300;
}

.pa-delivery-map-container {
    position: relative;
    height: calc(100vh - 120px);
    min-height: 500px;
}

#pa-delivery-map {
    height: 100%;
    width: 100%;
}

.pa-map-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
}

.pa-search-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pa-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pa-search-icon {
    font-size: 1.5rem;
    color: #667eea;
    flex-shrink: 0;
}

.pa-address-input {
    flex: 1;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    font-size: 1rem;
    border-radius: 12px;
    background: white;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.pa-address-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pa-location-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.pa-location-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pa-btn-icon {
    font-size: 1.2rem;
}

.pa-location-results {
    margin-top: 20px;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados de mensajes */
.pa-status-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    color: #155724;
    border-left: 4px solid #4caf50;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.pa-status-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.pa-status-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

/* Lista de negocios mejorada */
.pa-businesses-list {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 5px;
}

.pa-business-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.pa-business-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.pa-business-card:active {
    transform: translateY(0);
}

.pa-business-image {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.pa-business-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.pa-business-no-image {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.pa-business-status {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pa-business-status.open {
    background: #4caf50;
    color: white;
}

.pa-business-status.closed {
    background: #f44336;
    color: white;
}

.pa-business-content {
    flex: 1;
    min-width: 0;
}

.pa-business-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.pa-business-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
    flex: 1;
}

.pa-business-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff3cd;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #856404;
    flex-shrink: 0;
    margin-left: 10px;
}

.pa-rating-star {
    color: #ffc107;
}

.pa-business-description {
    color: #718096;
    font-size: 0.85rem;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pa-business-meta {
    margin-bottom: 10px;
}

.pa-business-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pa-category-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pa-business-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.pa-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #4a5568;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 8px;
}

.pa-stat-icon {
    font-size: 0.9rem;
}

.pa-stat.free {
    background: #e8f5e8;
    color: #2e7d32;
    font-weight: 600;
}

.pa-stat.paid {
    background: #fff3e0;
    color: #ef6c00;
}

.pa-business-minimum {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #666;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
}

.pa-minimum-icon {
    font-size: 0.8rem;
}

.pa-minimum-text {
    font-weight: 500;
}

.pa-no-businesses {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-style: italic;
}

/* Loading states mejorados */
.pa-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.pa-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#pa-loading-text {
    font-size: 1.1rem;
    color: #4a5568;
    font-weight: 500;
}

/* Scrollbar personalizado */
.pa-businesses-list::-webkit-scrollbar {
    width: 6px;
}

.pa-businesses-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.pa-businesses-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.pa-businesses-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
    .pa-app-title {
        font-size: 2rem;
    }
    
    .pa-delivery-map-container {
        height: calc(100vh - 100px);
    }
    
    .pa-map-overlay {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .pa-search-container {
        padding: 15px;
        border-radius: 15px;
    }
    
    .pa-search-box {
        flex-direction: column;
    }
    
    .pa-address-input {
        width: 100%;
    }
    
    .pa-location-btn {
        width: 100%;
        padding: 12px;
    }
    
    .pa-business-card {
        flex-direction: column;
        gap: 12px;
    }
    
    .pa-business-image {
        width: 100%;
        height: 120px;
    }
    
    .pa-business-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .pa-business-rating {
        align-self: flex-start;
    }
    
    .pa-business-stats {
        gap: 10px;
    }
    
    .pa-stat {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .pa-app-title {
        font-size: 1.8rem;
    }
    
    .pa-app-subtitle {
        font-size: 1rem;
    }
    
    .pa-header-content {
        padding: 0 15px;
    }
    
    .pa-search-container {
        padding: 12px;
    }
    
    .pa-address-input {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .pa-businesses-list {
        max-height: 50vh;
    }
    
    .pa-business-name {
        font-size: 1.1rem;
    }
    
    .pa-business-description {
        font-size: 0.8rem;
    }
}

/* Animaciones para las tarjetas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pa-business-card {
    animation: fadeInUp 0.5s ease forwards;
}

.pa-business-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.pa-business-card:nth-child(even) {
    animation-delay: 0.2s;
}