/**
 * Ignaz WhatsApp Leadbot Widget Styles
 */

/* Floating Button */
.iwl-floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s ease;
    animation: iwl-pulse 2s infinite;
}

.iwl-floating-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.iwl-floating-button svg {
    width: 32px;
    height: 32px;
}

.iwl-tooltip {
    display: none;
}

@keyframes iwl-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 10px rgba(37, 211, 102, 0);
    }
}

/* Widget Container */
.iwl-widget-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9999;
    animation: iwl-slide-up 0.3s ease;
}

@keyframes iwl-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.iwl-widget {
    width: 360px;
    max-height: 600px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.iwl-header {
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.iwl-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.iwl-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
}

.iwl-header-text {
    display: flex;
    flex-direction: column;
}

.iwl-header-text strong {
    font-size: 16px;
    font-weight: 600;
}

.iwl-header-text span {
    font-size: 13px;
    opacity: 0.9;
}

.iwl-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.iwl-close:hover {
    opacity: 1;
}

/* Messages View */
.iwl-messages-view {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.iwl-greeting {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.iwl-main-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Action Buttons */
.iwl-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.iwl-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    color: inherit;
    width: 100%;
    justify-content: flex-start;
    box-sizing: border-box;
}

.iwl-btn svg {
    flex-shrink: 0;
}

.iwl-btn-whatsapp {
    background: #25D366;
    color: white;
}

.iwl-btn-whatsapp:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.iwl-btn-callback,
.iwl-btn-phone,
.iwl-btn-email {
    background: white !important;
    border: 2px solid #e0e0e0 !important;
    color: #333 !important;
}

.iwl-btn-callback:hover,
.iwl-btn-phone:hover,
.iwl-btn-email:hover {
    background: white !important;
    border-color: #25D366 !important;
    color: #333 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Form View */
.iwl-form-view {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.iwl-back-button {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin-bottom: 16px;
    font-size: 14px;
    transition: color 0.2s;
}

.iwl-back-button:hover {
    background: transparent !important;
    color: #25D366 !important;
}

.iwl-form-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
}

.iwl-form-header p {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
}

.iwl-form-group {
    margin-bottom: 16px;
}

.iwl-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.iwl-form-group .required {
    color: #e74c3c;
}

.iwl-form-group input,
.iwl-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.iwl-form-group input:focus,
.iwl-form-group textarea:focus {
    outline: none;
    border-color: #25D366;
}

.iwl-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.iwl-form-messages {
    margin: 16px 0;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.iwl-form-messages.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.iwl-form-messages.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.iwl-btn-submit {
    background: #25D366 !important;
    color: white !important;
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 14px 20px;
    margin-top: 8px;
    border: none !important;
}

.iwl-btn-submit:hover {
    background: #20BA5A !important;
    color: white !important;
}

.iwl-btn-submit:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .iwl-floating-button {
        bottom: 15px;
        right: 15px;
        width: 56px;
        height: 56px;
    }

    .iwl-floating-button svg {
        width: 28px;
        height: 28px;
    }

    .iwl-widget-container {
        bottom: 80px;
        right: 15px;
        left: 15px;
    }

    .iwl-widget {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .iwl-widget-container {
        bottom: 80px;
        right: 10px;
        left: 10px;
    }

    .iwl-header {
        padding: 16px;
    }

    .iwl-avatar {
        width: 45px;
        height: 45px;
    }

    .iwl-messages-view,
    .iwl-form-view {
        padding: 20px;
    }

    .iwl-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}
