/**
 * Mobile Components CSS
 * Componentes específicos para a interface mobile
 */

/* ===== MOBILE HEADER ===== */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1rem;
}

.mobile-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.mobile-header p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

.mobile-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.action-btn:active {
    transform: scale(0.95);
}

/* ===== MOBILE FILTERS ===== */
.mobile-filters {
    padding: 0 1rem 1rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-filters.hidden {
    display: none;
}

.filter-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    background: #e5e7eb;
}

.filter-chip.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* ===== MOBILE SEARCH ===== */
.mobile-search {
    padding: 1rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-search.hidden {
    display: none;
}

.search-form {
    position: relative;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.search-input-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    color: #9ca3af;
    margin-right: 0.75rem;
    font-size: 1rem;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #1f2937;
    font-size: 1rem;
}

.search-input::placeholder {
    color: #9ca3af;
}

.close-search {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #e5e7eb;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-search:hover {
    background: #d1d5db;
    color: #374151;
}

/* ===== MOBILE CAROUSEL ===== */
.mobile-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 0 3rem;
}

.mobile-carousel-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    gap: 1rem;
}

.mobile-carousel-card {
    flex: 0 0 auto;
    width: 20rem;
    max-width: calc(100vw - 4rem);
}

.mobile-carousel-prev,
.mobile-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-carousel-prev {
    left: 0.5rem;
}

.mobile-carousel-next {
    right: 0.5rem;
}

.mobile-carousel-prev:hover,
.mobile-carousel-next:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.mobile-carousel-prev:active,
.mobile-carousel-next:active {
    transform: translateY(-50%) scale(0.95);
}

/* ===== MOBILE STATS ===== */
.mobile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
    padding: 1rem 0;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== ESTABLISHMENT CARDS ===== */
.establishment-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.establishment-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.establishment-card .card-image {
    position: relative;
    height: 12rem;
    overflow: hidden;
}

.establishment-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.establishment-card:hover .card-image img {
    transform: scale(1.05);
}

.establishment-card .card-content {
    padding: 1.5rem;
}

.establishment-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.establishment-card .card-address {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.establishment-card .card-rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.establishment-card .rating-stars {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.establishment-card .rating-value {
    font-weight: 600;
    color: #1f2937;
    margin-left: 0.5rem;
}

.establishment-card .rating-count {
    font-size: 0.75rem;
    color: #9ca3af;
}

.establishment-card .status-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.establishment-card .status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

.establishment-card .status-text {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 500;
}

.establishment-card .card-footer {
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.establishment-card .availability {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.establishment-card .view-more {
    font-size: 0.875rem;
    color: #3b82f6;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.establishment-card .view-more:hover {
    color: #1d4ed8;
}

.establishment-card .view-more i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.establishment-card:hover .view-more i {
    transform: translateX(0.25rem);
}

/* ===== LOADING STATES ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-spinner p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* ===== CARD LOADING ===== */
.card-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 1rem;
}

.card-loading .loading-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== FAVORITE BUTTON ===== */
.favorite-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    color: #ef4444;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #ef4444;
    background: rgba(255, 255, 255, 1);
}

/* ===== BADGES ===== */
.category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.likes-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.likes-badge i {
    color: #ef4444;
    font-size: 0.75rem;
}

/* ===== UTILITY CLASSES ===== */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scrollbar-hide {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .action-btn,
    .filter-chip,
    .mobile-carousel-prev,
    .mobile-carousel-next {
        min-height: 44px;
        min-width: 44px;
    }
    
    .establishment-card {
        padding: 1rem;
    }
    
    .establishment-card .card-content {
        padding: 1rem;
    }
} 