/**
 * WorkZen Floating Buttons
 * Beautiful expandable floating action button with smooth animations
 */

/* Main Container */
.wzc-floating-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.wzc-floating-container.position-left {
    right: auto;
    left: 30px;
}

/* Main Toggle Button */
.wzc-main-toggle {
    width: var(--wzc-button-size, 64px);
    height: var(--wzc-button-size, 64px);
    min-width: var(--wzc-button-size, 64px);
    min-height: var(--wzc-button-size, 64px);
    max-width: var(--wzc-button-size, 64px);
    max-height: var(--wzc-button-size, 64px);
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--wzc-button-color, #667eea) 0%, var(--wzc-button-color-dark, #764ba2) 100%);
    border: none !important;
    outline: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
    order: 2;
    overflow: hidden;
    flex-shrink: 0;
}

.wzc-main-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wzc-main-toggle:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wzc-main-toggle:focus {
    outline: none !important;
    border: none !important;
}

/* Toggle Icon */
.wzc-toggle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--wzc-icon-size, 32px);
    height: var(--wzc-icon-size, 32px);
}

.wzc-toggle-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    color: white;
}

.wzc-main-toggle.active .wzc-toggle-icon {
    transform: translate(-50%, -50%) rotate(180deg);
}

/* Action Buttons Container */
.wzc-action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    order: 1;
    margin-bottom: 16px;
    max-height: 0;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wzc-floating-container.expanded .wzc-action-buttons {
    max-height: 300px;
}

/* Individual Action Buttons */
.wzc-action-btn {
    width: var(--wzc-action-button-size, 57px);
    height: var(--wzc-action-button-size, 57px);
    min-width: var(--wzc-action-button-size, 57px);
    min-height: var(--wzc-action-button-size, 57px);
    max-width: var(--wzc-action-button-size, 57px);
    max-height: var(--wzc-action-button-size, 57px);
    border-radius: 50% !important;
    border: none !important;
    outline: none !important;
    background: white !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0;
    transform: scale(0) translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    overflow: visible;
    flex-shrink: 0;
}

.wzc-floating-container.expanded .wzc-action-btn {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Stagger animation delays */
.wzc-floating-container.expanded .wzc-action-btn:nth-child(1) {
    transition-delay: 0.05s;
}

.wzc-floating-container.expanded .wzc-action-btn:nth-child(2) {
    transition-delay: 0.1s;
}

.wzc-floating-container.expanded .wzc-action-btn:nth-child(3) {
    transition-delay: 0.15s;
}

/* Button Hover Effects */
.wzc-action-btn:hover {
    transform: scale(1.15) translateY(0);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wzc-action-btn:active {
    transform: scale(0.95) translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wzc-action-btn:focus {
    outline: none !important;
    border: none !important;
}

/* Button type specific styles removed - all buttons now white with colored icons */

/* Button Icons */
.wzc-action-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* Icon colors for different button types */
.wzc-action-btn.call svg,
.wzc-action-btn.whatsapp svg {
    color: #25D366 !important;
    fill: currentColor !important;
}

.wzc-action-btn.contact svg {
    color: #4facfe !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.wzc-action-btn.booking svg {
    color: #667eea !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.5 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* Button Labels (Tooltips) */
.wzc-action-btn::before {
    content: attr(data-label);
    position: absolute;
    right: 75px;
    top: 50%;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(10px);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.wzc-floating-container.position-left .wzc-action-btn::before {
    right: auto;
    left: 75px;
    transform: translateY(-50%) translateX(-10px);
}

.wzc-floating-container.expanded .wzc-action-btn:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.wzc-floating-container.expanded.position-left .wzc-action-btn:hover::before {
    transform: translateY(-50%) translateX(0);
}

/* Backdrop Overlay */
.wzc-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

.wzc-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Overlay */
.wzc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wzc-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Contact Form Modal */
.wzc-modal {
    background: white;
    border-radius: 24px;
    padding: 0;
    max-width: 720px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wzc-modal-overlay.active .wzc-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.wzc-modal-header {
    background: white;
    padding: 40px 40px 20px 40px;
    position: relative;
}

.wzc-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    padding: 0 !important;
}

.wzc-modal-close:hover {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.wzc-modal-close:focus {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.wzc-modal-close svg {
    width: 18px;
    height: 18px;
    stroke: #64748b;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: transform 0.2s ease;
}

.wzc-modal-close:hover svg {
    transform: scale(1.2);
}

.wzc-modal-title {
    position: relative;
}

.wzc-modal-title h2 {
    margin: 0 0 12px 0;
    font-size: 36px;
    font-weight: 900;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: -0.5px;
}

.wzc-modal-title p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Modal Body */
.wzc-modal-body {
    padding: 20px 40px 40px 40px;
}

/* Form Styles */
.wzc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wzc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.wzc-form-group {
    position: relative;
}

.wzc-form-group label {
    display: none;
}

.wzc-form-group input,
.wzc-form-group textarea {
    width: 100%;
    padding: 16px 20px !important;
    border: 1px solid #9ca3af !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    max-width: 100%;
}

.wzc-form-group input::placeholder,
.wzc-form-group textarea::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

.wzc-form-group input:focus,
.wzc-form-group textarea:focus {
    outline: none !important;
    border-color: #6b7280 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.wzc-form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Submit Button */
.wzc-submit-btn {
    width: 100%;
    padding: 18px 24px !important;
    background: #000000 !important;
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    margin-top: 8px;
    text-decoration: none !important;
}

.wzc-submit-btn:hover {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.wzc-submit-btn:focus {
    background: #000000 !important;
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.wzc-submit-btn:active {
    transform: translateY(0);
    background: #000000 !important;
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.wzc-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #000000 !important;
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
}

.wzc-submit-btn.loading {
    position: relative;
    color: transparent !important;
    background: #000000 !important;
    background-color: #000000 !important;
    border: none !important;
}

.wzc-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Form Messages */
.wzc-form-message {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

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

.wzc-form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

.wzc-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

.wzc-form-message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wzc-floating-container {
        bottom: 20px;
        right: 20px;
    }

    .wzc-floating-container.position-left {
        left: 20px;
    }

    /* Responsive sizing will be handled by JavaScript to maintain aspect ratio */
    .wzc-toggle-icon {
        /* Icon size scales with button size */
    }

    .wzc-action-btn {
        width: var(--wzc-action-button-size, 52px);
        height: var(--wzc-action-button-size, 52px);
    }

    .wzc-action-btn svg {
        width: 24px;
        height: 24px;
    }

    .wzc-action-btn::before {
        display: none;
    }

    .wzc-modal {
        width: 95%;
        border-radius: 20px;
    }

    .wzc-modal-header {
        padding: 32px 24px 16px 24px;
    }

    .wzc-modal-title h2 {
        font-size: 28px;
    }

    .wzc-modal-body {
        padding: 16px 24px 32px 24px;
    }

    .wzc-form {
        gap: 16px;
    }

    .wzc-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .wzc-action-btn {
        width: var(--wzc-action-button-size, 48px);
        height: var(--wzc-action-button-size, 48px);
    }

    .wzc-modal-header {
        padding: 24px 20px 12px 20px;
    }

    .wzc-modal-title h2 {
        font-size: 24px;
    }

    .wzc-modal-body {
        padding: 12px 20px 24px 20px;
    }
}

/* =====================================================
   Button Animations
   ===================================================== */

/* Animation Classes */
.wzc-main-toggle.wzc-animate-pulse {
    animation: wzc-pulse var(--wzc-animation-duration, 1s) ease-in-out;
}

.wzc-main-toggle.wzc-animate-bounce {
    animation: wzc-bounce var(--wzc-animation-duration, 1s) ease-in-out;
}

.wzc-main-toggle.wzc-animate-shake {
    animation: wzc-shake var(--wzc-animation-duration, 1s) ease-in-out;
}

.wzc-main-toggle.wzc-animate-swing {
    animation: wzc-swing var(--wzc-animation-duration, 1s) ease-in-out;
}

.wzc-main-toggle.wzc-animate-wobble {
    animation: wzc-wobble var(--wzc-animation-duration, 1s) ease-in-out;
}

.wzc-main-toggle.wzc-animate-spin {
    animation: wzc-spin var(--wzc-animation-duration, 1s) ease-in-out;
}

.wzc-main-toggle.wzc-animate-jello {
    animation: wzc-jello var(--wzc-animation-duration, 1s) ease-in-out;
}

.wzc-main-toggle.wzc-animate-tada {
    animation: wzc-tada var(--wzc-animation-duration, 1s) ease-in-out;
}

/* Keyframe Animations */
@keyframes wzc-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

@keyframes wzc-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-8px);
    }
}

@keyframes wzc-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes wzc-swing {
    0% {
        transform: rotate(0deg);
    }
    20% {
        transform: rotate(15deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    60% {
        transform: rotate(5deg);
    }
    80% {
        transform: rotate(-2deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes wzc-wobble {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    15% {
        transform: translateX(-8px) rotate(-5deg);
    }
    30% {
        transform: translateX(7px) rotate(3deg);
    }
    45% {
        transform: translateX(-6px) rotate(-3deg);
    }
    60% {
        transform: translateX(5px) rotate(2deg);
    }
    75% {
        transform: translateX(-3px) rotate(-1deg);
    }
}

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

@keyframes wzc-jello {
    0%, 100% {
        transform: skewX(0deg) skewY(0deg);
    }
    11.1% {
        transform: skewX(-12.5deg) skewY(-12.5deg);
    }
    22.2% {
        transform: skewX(6.25deg) skewY(6.25deg);
    }
    33.3% {
        transform: skewX(-3.125deg) skewY(-3.125deg);
    }
    44.4% {
        transform: skewX(1.5625deg) skewY(1.5625deg);
    }
    55.5% {
        transform: skewX(-0.78125deg) skewY(-0.78125deg);
    }
    66.6% {
        transform: skewX(0.390625deg) skewY(0.390625deg);
    }
    77.7% {
        transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
    }
    88.8% {
        transform: skewX(0.09765625deg) skewY(0.09765625deg);
    }
}

@keyframes wzc-tada {
    0%, 100% {
        transform: scale(1) rotate(0);
    }
    10%, 20% {
        transform: scale(0.95) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.05) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.05) rotate(-3deg);
    }
}
