/**
 * Moeble - Encontre um Profissional
 * Design Ultra Moderno | 2025
 */

/* ===== VARIÁVEIS CSS ===== */
.moeble-encontre-container {
    /* Cores */
    --primary: #000000;
    --primary-light: #1a1a1a;
    --accent: #000000;
    --accent-light: #333333;
    --bg: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #e5e7eb;
    --border-focus: #000000;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    
    /* Espaçamento e Dimensões */
    --radius-sm: 10px;
    --radius: 10px;
    --radius-lg: 10px;
    --radius-xl: 10px;
    --radius-full: 9999px;
    
    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Tipografia */
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.moeble-encontre-container * {
    box-sizing: border-box;
}

/* ===== HEADER ===== */
.moeble-header {
    text-align: center;
    margin-bottom: 64px;
    animation: fadeInUp 0.6s ease-out;
}

.moeble-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.moeble-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* ===== FORMULÁRIO DE BUSCA ===== */
.moeble-search-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 64px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.moeble-search-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #000000 0%, #333333 100%);
}

.moeble-search-form-wrapper:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.moeble-search-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.moeble-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    align-items: flex-start;
}

.moeble-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.moeble-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.moeble-form-group label svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* ===== INPUTS MODERNOS ===== */
.moeble-input,
.moeble-select {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius);
    transition: var(--transition);
    outline: none;
    appearance: none;
}

.moeble-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.moeble-select {
    padding-right: 48px;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.moeble-input:hover,
.moeble-select:hover {
    background: #f0f1f3;
}

.moeble-input:focus,
.moeble-select:focus {
    background: var(--bg);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.moeble-input:disabled,
.moeble-select:disabled {
    background: #e5e7eb;
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===== HELP TEXT ===== */
.moeble-help-text {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
}

/* ===== DIVISOR OU ===== */
.moeble-form-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
    position: relative;
}

.moeble-form-divider span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 0 16px;
    z-index: 1;
    letter-spacing: 0.1em;
}

.moeble-form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

/* ===== BOTÕES ULTRA MODERNOS ===== */
.moeble-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.moeble-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.moeble-btn:hover::before {
    width: 300px;
    height: 300px;
}

.moeble-btn svg {
    position: relative;
    z-index: 1;
}

.moeble-btn span {
    position: relative;
    z-index: 1;
}

.moeble-btn-primary {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: #ffffff !important;
    box-shadow: var(--shadow);
}

.moeble-btn-primary svg {
    stroke: #ffffff !important;
}

.moeble-btn-primary:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.moeble-btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.moeble-btn-secondary {
    background: var(--bg);
    color: var(--primary);
    border: 2px solid var(--border);
}

.moeble-btn-secondary:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

/* ===== LOADING STATES ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.moeble-spinner,
.moeble-spinner-large {
    animation: spin 0.8s linear infinite;
}

.moeble-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px;
    text-align: center;
}

.moeble-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.moeble-loading p {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

/* ===== RESULTS HEADER ===== */
.moeble-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
    animation: fadeInUp 0.4s ease-out;
}

.moeble-results-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.moeble-results-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.moeble-results-count {
    font-weight: 700;
    color: var(--primary);
    padding: 6px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

/* ===== ALERTS ===== */
.moeble-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    animation: slideDown 0.3s ease-out;
}

.moeble-alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.moeble-alert-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e5e7eb 100%);
    border: 1px solid #d1d5db;
    color: #1a1a1a;
}

/* ===== GRID DE RESULTADOS ===== */
.moeble-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 64px;
}

/* ===== CARDS ULTRA MODERNOS ===== */
.moeble-professional-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.4s ease-out backwards;
}

.moeble-professional-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #000000 0%, #333333 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.moeble-professional-card:hover::before {
    transform: scaleX(1);
}

.moeble-professional-card:hover {
    border-color: #333333;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.moeble-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.moeble-card-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f0f1f3 0%, #e5e7eb 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.moeble-professional-card:hover .moeble-card-avatar {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border-color: var(--primary);
}

.moeble-professional-card:hover .moeble-card-avatar svg {
    stroke: var(--bg);
}

.moeble-card-info {
    flex: 1;
    min-width: 0;
}

.moeble-professional-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 8px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.moeble-professional-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.moeble-professional-location svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.moeble-card-distance {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.moeble-distance-value {
    font-size: 24px;
    font-weight: 800;
    color: #000000;
    line-height: 1;
}

.moeble-card-distance small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.moeble-card-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.moeble-phone-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.moeble-phone-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.moeble-phone-link:hover::before {
    left: 100%;
}

.moeble-phone-link:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.moeble-phone-link svg {
    width: 18px;
    height: 18px;
    stroke: #ffffff !important;
}

/* ===== EMPTY STATE ===== */
.moeble-empty-state {
    text-align: center;
    padding: 120px 20px;
    animation: fadeIn 0.5s ease-out;
}

.moeble-empty-icon {
    margin-bottom: 32px;
    opacity: 0.3;
}

.moeble-empty-icon svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
}

.moeble-empty-state h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 12px 0;
    letter-spacing: -0.01em;
}

.moeble-empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 32px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== PAGINAÇÃO MODERNA ===== */
.moeble-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 48px 0;
    animation: fadeInUp 0.4s ease-out;
}

.moeble-pagination button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    color: var(--primary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.moeble-pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.moeble-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.moeble-pagination-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.moeble-current-page {
    font-weight: 800;
    color: var(--primary);
    font-size: 16px;
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Cards aparecem em sequência */
.moeble-professional-card:nth-child(1) { animation-delay: 0.05s; }
.moeble-professional-card:nth-child(2) { animation-delay: 0.1s; }
.moeble-professional-card:nth-child(3) { animation-delay: 0.15s; }
.moeble-professional-card:nth-child(4) { animation-delay: 0.2s; }
.moeble-professional-card:nth-child(5) { animation-delay: 0.25s; }
.moeble-professional-card:nth-child(6) { animation-delay: 0.3s; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .moeble-encontre-container {
        padding: 32px 16px;
    }
    
    .moeble-header {
        margin-bottom: 48px;
    }
    
    .moeble-title {
        font-size: 32px;
    }
    
    .moeble-subtitle {
        font-size: 16px;
    }
    
    .moeble-search-form-wrapper {
        padding: 24px;
        margin-bottom: 48px;
    }
    
    .moeble-form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .moeble-form-divider {
        margin: 16px 0;
    }
    
    .moeble-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 32px;
    }
    
    .moeble-results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .moeble-btn {
        width: 100%;
    }
    
    .moeble-pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .moeble-professional-card {
        padding: 20px;
    }
    
    .moeble-card-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .moeble-card-distance {
        align-items: center;
    }
    
    .moeble-professional-location {
        justify-content: center;
    }
    
    .moeble-phone-link {
        width: 100%;
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.moeble-btn:focus-visible,
.moeble-input:focus-visible,
.moeble-select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== LOADING SKELETON ===== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.moeble-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: var(--radius);
}
