/**
 * Estilos del widget para el frontend
 * 
 * @package Zendesk_SC_Widget
 * @since 1.0.0
 */

/* Estilos para los botones de acción dentro del widget */
.zscw-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin: 10px 15px;
}

.zscw-action-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.zscw-btn-agent {
    background-color: #0074D9;
    color: white;
}

.zscw-btn-agent:hover {
    background-color: #005bb0;
    transform: translateY(-1px);
}

.zscw-btn-close {
    background-color: #dc3545;
    color: white;
}

.zscw-btn-close:hover {
    background-color: #b02a37;
    transform: translateY(-1px);
}

.zscw-btn-agent:disabled,
.zscw-btn-close:disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* Mensaje de espera */
#zscw-waiting-message {
    padding: 10px 12px;
    margin: 0 0 10px 0;
    max-width: 85%;
    background: linear-gradient(135deg, #e8f4fd 0%, #d1e8fa 100%);
    border-radius: 12px;
    border-left: 4px solid #0074D9;
    font-size: 12px;
    color: #333;
    line-height: 1.4;
    animation: zscw-fadeIn 0.3s ease-in;
}

#zscw-waiting-message .zscw-waiting-content {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

#zscw-waiting-message .zscw-waiting-icon {
    font-size: 14px;
}

/* Botones inline dentro del iframe */
#zscw-inline-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    margin: 0 0 10px 0;
    background: #f8f9fa;
    border-radius: 12px;
}

#zscw-inline-buttons p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    text-align: center;
}

#zscw-inline-buttons button {
    padding: 12px 16px;
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

#zscw-inline-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#zscw-inline-buttons button:disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* Botones flotantes (fallback) */
#zscw-floating-buttons {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 999999;
}

#zscw-floating-buttons .zscw-floating-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 260px;
    border: 1px solid #e0e0e0;
    animation: zscw-slideIn 0.3s ease;
}

#zscw-floating-buttons p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

#zscw-floating-buttons button {
    padding: 10px 14px;
    border: none;
    border-radius: 18px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#zscw-floating-buttons button:hover {
    transform: translateY(-1px);
}

/* Animaciones */
@keyframes zscw-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zscw-slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media screen and (max-width: 480px) {
    #zscw-floating-buttons {
        right: 10px;
        left: 10px;
    }

    #zscw-floating-buttons .zscw-floating-container {
        max-width: 100%;
    }

    .zscw-action-buttons {
        margin: 10px;
    }
}

/* Estilos para cuando el widget está en modo oscuro */
@media (prefers-color-scheme: dark) {
    #zscw-waiting-message {
        background: linear-gradient(135deg, #1a2a3a 0%, #2a3a4a 100%);
        color: #e0e0e0;
    }

    #zscw-inline-buttons {
        background: #2a2a2a;
    }

    #zscw-inline-buttons p {
        color: #e0e0e0;
    }

    #zscw-floating-buttons .zscw-floating-container {
        background: #2a2a2a;
        border-color: #444;
    }

    #zscw-floating-buttons p {
        color: #e0e0e0;
    }
}
