/**
 * ServiceMates Floating Widget Styles
 * Chat & Phone floating buttons
 */

/* Floating Widget Container */
.sm-floating-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* Floating Action Buttons */
.sm-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.sm-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.sm-fab-chat {
    background: linear-gradient(135deg, var(--sm-primary-color, #f93), var(--sm-secondary-color, #FF5326));
}

.sm-fab-chat.active {
    background: #666;
    transform: rotate(90deg);
}

.sm-fab-call {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.sm-fab-call:hover {
    background: linear-gradient(135deg, #128C7E, #075E54);
}

/* Chat Panel */
.sm-chat-panel {
    position: absolute;
    bottom: 130px;
    right: 0;
    width: 340px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sm-chat-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.sm-chat-header {
    background: linear-gradient(135deg, var(--sm-primary-color, #f93), var(--sm-secondary-color, #FF5326));
    color: #fff;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sm-chat-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sm-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.sm-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chat Body */
.sm-chat-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

/* Quick Form */
.sm-quick-form .sm-form-group {
    margin-bottom: 14px;
}

.sm-quick-form input,
.sm-quick-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.sm-quick-form input:focus,
.sm-quick-form textarea:focus {
    outline: none;
    border-color: var(--sm-primary-color, #f93);
    box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.15);
}

.sm-quick-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Submit Button */
.sm-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--sm-primary-color, #f93), var(--sm-secondary-color, #FF5326));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.sm-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 153, 51, 0.4);
}

.sm-submit-btn .btn-loading {
    display: none;
}

.sm-submit-btn.loading .btn-text {
    visibility: hidden;
}

.sm-submit-btn.loading .btn-loading {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Success & Error Messages */
.sm-quick-success,
.sm-quick-error {
    text-align: center;
    padding: 30px 20px;
}

.sm-quick-success i,
.sm-quick-error i {
    font-size: 50px;
    margin-bottom: 15px;
}

.sm-quick-success i {
    color: #25D366;
}

.sm-quick-error i {
    color: #e74c3c;
}

.sm-quick-success h4 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #333;
}

.sm-quick-success p,
.sm-quick-error p {
    margin: 0;
    color: #666;
}

/* Chat Footer */
.sm-chat-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.sm-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.sm-call-btn:hover {
    background: linear-gradient(135deg, #128C7E, #075E54);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    color: #fff;
}

.sm-call-btn i {
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .sm-floating-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .sm-fab {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
    
    .sm-chat-panel {
        width: calc(100vw - 30px);
        right: 0;
        bottom: 120px;
        max-width: 340px;
    }
    
    .sm-chat-body {
        max-height: 350px;
    }
}

/* Animation for icons */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.sm-fab-call {
    animation: pulse 2s infinite;
}

.sm-fab-call:hover {
    animation: none;
}

