
/* Estilos isolados para o modal de transfer */
.location-panel-transfer {
    background: linear-gradient(to br, #f0f4f8, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.location-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-title i {
    color: #3182ce;
}

.refresh-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.refresh-btn i {
    color: #3182ce;
}

.location-status-box {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-content {
    text-align: center;
}

.status-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 5px;
}

.status-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-subtitle {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.loading-dots {
    display: flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #3182ce;
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.map-container-transfer {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.transfer-map-canvas {
    width: 100%;
    height: 350px;
    background: #e2e8f0;
}

.map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #718096;
}

.map-loading i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.precision-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.precision-badge.hidden {
    opacity: 0;
    transform: translateY(10px);
}

.precision-badge i {
    font-size: 0.9rem;
}

/* CORREÇÃO PRINCIPAL - Wrapper para o campo de destino */
.destination-input-wrapper {
    position: relative;
    z-index: 1000;
}

.input-wrapper {
    position: relative;
}

.location-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 5;
}

.location-btn:hover {
    background: #2c5282;
    transform: translateY(-50%) scale(1.1);
}

/* CORREÇÃO PRINCIPAL - Sugestões posicionadas corretamente */
.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestions-dropdown.show {
    display: block;
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f7fafc;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    transform: translateX(5px);
}

.suggestion-item strong {
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 600;
}

.suggestion-item small {
    color: #718096;
    font-size: 0.8rem;
    line-height: 1.2;
}

/* Melhorar o input de destino */
#destination-transfer {
    padding-right: 45px;
}

#destination-transfer:focus + .suggestions-dropdown {
    border-color: #3182ce;
}

/* NOVOS ESTILOS PARA ROTA REAL */
.route-line {
    transition: all 0.3s ease;
}

.route-loading {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 12px;
    border: 1px solid #e0e6ed;
    text-align: center;
    padding: 20px;
}

.route-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Melhorar aparência dos stats */
.route-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* Google Maps customizations */
.gm-style-iw-d {
    overflow: hidden !important;
    border-radius: 8px;
}

.gm-style .gm-style-iw-c {
    border-radius: 8px !important;
}

/* Scrollbar customizada para sugestões */
.suggestions-dropdown::-webkit-scrollbar {
    width: 6px;
}

.suggestions-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.suggestions-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.suggestions-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Responsividade */
@media (max-width: 768px) {
    .transfer-map-canvas {
        height: 250px;
    }
    
    .location-panel-transfer {
        padding: 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .route-stats {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .suggestions-dropdown {
        max-height: 200px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .suggestion-item {
        padding: 10px 12px;
    }
    
    .suggestion-item strong {
        font-size: 0.85rem;
    }
    
    .suggestion-item small {
        font-size: 0.75rem;
    }
}


:root {
    --primary-color: #005ea4;
    --secondary-color: #0095ae;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Botão principal */
.transfer-button-container {
    margin: 2rem 0;
    text-align: center;
}

.transfer-main-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    width: 100%;
    max-width: 400px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.transfer-main-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.transfer-main-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

.btn-text {
    flex: 1;
    text-align: left;
}

.btn-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
}

.btn-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    display: block;
}

.btn-badge {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-number {
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-warning {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius);
    color: #856404;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.auth-warning svg {
    width: 16px;
    height: 16px;
}

/* Modal moderno */
.modern-modal {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modern-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1.5rem 2rem;
    border-bottom: none;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon svg {
    width: 24px;
    height: 24px;
}

.header-text h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.modern-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modern-close svg {
    width: 20px;
    height: 20px;
}

.modern-body {
    padding: 2rem;
    background: var(--light-bg);
}

/* Seção do mapa */
.map-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.map-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
}

.map-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.location-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 1; }
    70% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(0.95); opacity: 1; }
}

.modern-map {
    height: 350px;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Formulário moderno */
.modern-form {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.modern-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modern-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
    font-size: 0.9rem;
}

.modern-label svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.input-wrapper {
    position: relative;
}

.modern-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e6ed;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 94, 164, 0.1);
}

.current-location-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.current-location-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

.current-location-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Informações da rota */
.route-info {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: none;
}

.route-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.route-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.route-stat svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

/* Botão de submit */
.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--success-color), #20c997);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.submit-btn svg {
    width: 20px;
    height: 20px;
}

/* Seções de conteúdo */
.content-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .content-sections {
        grid-template-columns: 1fr;
    }
}

.section-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.section-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
}

.section-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.section-content {
    padding: 1.5rem;
    min-height: 100px;
}

/* Solicitação existente */
.existing-request {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.alert-icon {
    width: 60px;
    height: 60px;
    background: #856404;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.existing-request p {
    margin: 0;
    color: #856404;
    font-weight: 500;
}

/* Responsividade */
@media (max-width: 576px) {
    .modern-body {
        padding: 1rem;
    }
    
    .btn-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .btn-text {
        text-align: center;
    }
    
    .modern-map {
        height: 250px;
    }
}

/* Popup de sucesso melhorado */
.success-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    z-index: 10000;
    display: none;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
