/* =====================================================
   COMPONENTE: DROPDOWN DE CONTACTOS
   ===================================================== */

.contacts-dropdown-container {
    position: relative;
    display: inline-block;
}

/* Botón de contactos - mismo estilo que notes-button */
.contacts-button {
    position: relative;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.1em;
    width: 40px;
    height: 40px;
}

.contacts-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Overlay */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 999;
}

/* Dropdown */
.contacts-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.2s ease-out;
}

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

/* Header del dropdown */
.dropdown-header {
    padding: 15px 20px;
    border-bottom: 2px solid #f3f4f6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dropdown-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
}

/* Loading */
.dropdown-loading {
    padding: 40px;
    text-align: center;
    color: #999;
}

.loading-spinner-small {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* Empty state */
.dropdown-empty {
    padding: 50px 20px;
    text-align: center;
    color: #999;
}

/* Lista de contactos */
.contacts-list {
    overflow-y: auto;
    max-height: 400px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f3f4f6;
    gap: 12px;
    transition: all 0.2s ease;
}

.contact-item:hover {
    background: #f9fafb;
}

.contact-icon {
    font-size: 32px;
    color: #667eea;
    flex-shrink: 0;
}

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

.contact-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 3px 0;
}

.contact-role {
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
    margin: 0 0 5px 0;
}

.contact-description {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.contact-whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.contact-whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5);
}

/* Footer */
.dropdown-footer {
    padding: 12px 20px;
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
}

/* Responsive */
@media (max-width: 768px) {
    .contacts-dropdown {
        width: 320px;
        max-height: 400px;
    }

    .contacts-list {
        max-height: 300px;
    }

    .contact-item {
        padding: 12px 15px;
    }

    .contact-icon {
        font-size: 28px;
    }

    .contact-name {
        font-size: 14px;
    }

    .contact-role {
        font-size: 12px;
    }

    .contact-description {
        font-size: 11px;
    }

    .contact-whatsapp-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .contacts-button {
        width: 36px;
        height: 36px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .contacts-dropdown {
        position: fixed;
        top: auto;
        right: 10px;
        left: 10px;
        bottom: 10px;
        width: auto;
        max-height: 70vh;
    }
}
