/* Zepher Callback Widget - Frontend Styles */

.zcw-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.zcw-bottom-right {
    bottom: 30px;
    right: 30px;
}

.zcw-bottom-left {
    bottom: 30px;
    left: 30px;
}

/* Floating Button */
.zcw-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.zcw-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.zcw-toggle-btn svg {
    width: 24px;
    height: 24px;
}

/* Popup */
.zcw-popup {
    position: absolute;
    bottom: 80px;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: zcw-slide-up 0.3s ease;
}

.zcw-bottom-right .zcw-popup {
    right: 0;
}

.zcw-bottom-left .zcw-popup {
    left: 0;
}

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

.zcw-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.zcw-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.zcw-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.zcw-close-btn:hover {
    opacity: 1;
}

.zcw-popup-body {
    padding: 20px;
}

.zcw-subtext {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.zcw-form-group {
    margin-bottom: 14px;
}

.zcw-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.zcw-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.zcw-form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.zcw-submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.zcw-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.zcw-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.zcw-success-message {
    text-align: center;
    padding: 20px;
    color: #28a745;
    font-size: 15px;
    font-weight: 600;
}

.zcw-error-message {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    text-align: center;
}

/* Hide on mobile option */
.zcw-hide-mobile {
    display: block;
}

@media (max-width: 768px) {
    .zcw-hide-mobile {
        display: none !important;
    }
    
    .zcw-popup {
        width: 280px;
    }
    
    .zcw-toggle-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Loading spinner */
.zcw-submit-btn.loading {
    position: relative;
    color: transparent;
}

.zcw-submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: zcw-spin 0.6s linear infinite;
}

@keyframes zcw-spin {
    to {
        transform: rotate(360deg);
    }
}
