/* ConsultarIP Plugin v4.1 - Layout Premium com Botão Mostrar Mapa */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

.cip-container {
    font-family: 'Inter', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Card Principal */
.cip-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 32px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(31, 99, 146, 0.08);
}

/* Header */
.cip-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.cip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1F6392 0%, #2c7da0 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(31, 99, 146, 0.2);
}

.cip-badge i {
    margin-right: 8px;
}

.cip-title {
    font-size: 3rem;
    font-weight: 800;
    color: #0F2B3D;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.cip-subtitle {
    font-size: 1.125rem;
    color: #6c757d;
    margin: 0;
}

/* Box do IP */
.cip-ip-box {
    background: linear-gradient(135deg, #0F2B3D 0%, #1F6392 100%);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.cip-ip-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.cip-ip-label i {
    margin-right: 8px;
}

.cip-ip-value-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cip-ip-value {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cip-btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.cip-btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Grid de Informações */
.cip-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.cip-info-card {
    background: #ffffff;
    padding: 1.2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(31, 99, 146, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cip-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.cip-info-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #E8F0F8 0%, #D4E4F0 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #1F6392;
}

.cip-info-content {
    flex: 1;
    text-align: left;
}

.cip-info-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 4px;
}

.cip-info-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0F2B3D;
    word-break: break-word;
}

/* Container do Mapa (inicialmente escondido) */
#cip-mapa-container {
    display: none;
    margin: 20px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

#cip-mapa-container.visible {
    display: block;
    animation: cip-fadeIn 0.5s ease;
}

@keyframes cip-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#cip-mapa {
    min-height: 350px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    overflow: hidden;
}

/* Loading do Mapa */
.cip-map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 350px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
}

.cip-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top-color: #1F6392;
    border-radius: 50%;
    animation: cip-spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes cip-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Botões de Ação */
.cip-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cip-btn {
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cip-btn-primary {
    background: #1F6392;
    color: white;
    box-shadow: 0 4px 12px rgba(31, 99, 146, 0.3);
}

.cip-btn-primary:hover {
    background: #0F2B3D;
    transform: translateY(-2px);
}

.cip-btn-mapa {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.cip-btn-mapa:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba086 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.cip-btn-outline {
    background: transparent;
    border: 2px solid #1F6392;
    color: #1F6392;
}

.cip-btn-outline:hover {
    background: #1F6392;
    color: white;
}

/* Botões de Compartilhamento */
.cip-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.cip-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cip-share-btn.whatsapp { background: #25D366; color: white; }
.cip-share-btn.twitter { background: #1DA1F2; color: white; }
.cip-share-btn.copy-link { background: #6c757d; color: white; }
.cip-share-btn:hover { transform: scale(1.1); }

/* Histórico Local */
.cip-historico-local {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(31, 99, 146, 0.1);
}

.cip-historico-local h4 {
    margin: 0 0 1rem 0;
    color: #0F2B3D;
}

.cip-historico-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cip-historico-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cip-historico-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.cip-historico-item small {
    font-size: 0.7rem;
    color: #6c757d;
}

/* Badge de Tempo de Resposta */
.cip-tempo-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(31, 99, 146, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Features */
.cip-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.cip-feature {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(31, 99, 146, 0.1);
    transition: all 0.3s ease;
}

.cip-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.cip-feature i {
    font-size: 2.5rem;
    color: #1F6392;
    margin-bottom: 1rem;
}

.cip-feature h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0F2B3D;
    margin: 0 0 0.5rem 0;
}

.cip-feature p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

/* FAQ */
.cip-faq {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.cip-faq h3 {
    margin: 0 0 1rem 0;
    color: #0F2B3D;
}

.cip-faq-item {
    border-bottom: 1px solid #e9ecef;
}

.cip-faq-pergunta {
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: #1F6392;
    transition: all 0.2s;
}

.cip-faq-pergunta:hover {
    background: #f8f9fa;
}

.cip-faq-resposta {
    padding: 0 1rem 1rem 1rem;
    display: none;
    color: #6c757d;
    line-height: 1.5;
}

/* Mensagem */
.cip-message {
    margin-top: 1.5rem;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
}

/* Marcadores do Mapa */
.custom-marker, .custom-marker-fallback {
    background: transparent;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.leaflet-popup-content {
    margin: 12px 16px;
    font-family: 'Inter', sans-serif;
}

.leaflet-control-scale {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    background: rgba(255,255,255,0.9);
    border-radius: 4px;
    padding: 2px 5px;
}

/* Responsivo */
@media (max-width: 768px) {
    .cip-card { padding: 1.5rem; }
    .cip-title { font-size: 1.8rem; }
    .cip-ip-value { font-size: 1.5rem; }
    .cip-info-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .cip-features { grid-template-columns: 1fr; }
    .cip-actions { flex-direction: column; }
    .cip-btn { width: 100%; justify-content: center; }
}