/**
 * Float Buttons - Dezent & Geil
 *
 * Very subtle, professional floating action buttons
 * Bottom right position, beautiful animations
 *
 * @package AirportTransferRoutes
 * @since 2.0.0
 */

/* ============================================
   CSS Variables (customizable via Company settings)
   ============================================ */
:root {
    --atr-float-primary: #667eea;
    --atr-float-secondary: #764ba2;
    --atr-float-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    --atr-float-shadow-hover: 0 8px 24px rgba(102, 126, 234, 0.25);
    --atr-float-z-index: 9999;
}

/* ============================================
   Container
   ============================================ */
.atr-float-buttons {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--atr-float-z-index);
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 12px;
}

/* ============================================
   Main Toggle Button (+ icon)
   ============================================ */
.atr-float-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--atr-float-primary), var(--atr-float-secondary));
    border: none;
    box-shadow: var(--atr-float-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}

.atr-float-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--atr-float-shadow-hover);
}

.atr-float-toggle:active {
    transform: scale(0.95);
}

/* Icon transitions */
.atr-float-icon {
    position: absolute;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.atr-float-icon-open {
    opacity: 1;
    transform: rotate(0deg);
}

.atr-float-icon-close {
    opacity: 0;
    transform: rotate(-90deg);
}

.atr-float-buttons.is-open .atr-float-icon-open {
    opacity: 0;
    transform: rotate(90deg);
}

.atr-float-buttons.is-open .atr-float-icon-close {
    opacity: 1;
    transform: rotate(0deg);
}

/* ============================================
   Button Menu
   ============================================ */
.atr-float-menu {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.atr-float-buttons.is-open .atr-float-menu {
    max-height: 300px;
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   Individual Buttons
   ============================================ */
.atr-float-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 16px;
    background: white;
    border-radius: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #2d3748;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    transform: translateY(10px);
    opacity: 0;
}

/* Staggered animation for buttons */
.atr-float-buttons.is-open .atr-float-button {
    transform: translateY(0);
    opacity: 1;
}

.atr-float-buttons.is-open .atr-float-button:nth-child(1) {
    transition-delay: 0.05s;
}

.atr-float-buttons.is-open .atr-float-button:nth-child(2) {
    transition-delay: 0.1s;
}

.atr-float-buttons.is-open .atr-float-button:nth-child(3) {
    transition-delay: 0.15s;
}

.atr-float-button:hover {
    transform: translateX(-4px) scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.atr-float-button:active {
    transform: translateX(-4px) scale(0.98);
}

/* Button icons */
.atr-float-button svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ============================================
   Button Specific Colors
   ============================================ */

/* WhatsApp */
.atr-float-whatsapp {
    color: #25D366;
}

.atr-float-whatsapp svg {
    color: #25D366;
}

.atr-float-whatsapp:hover {
    background: #25D366;
    color: white;
}

.atr-float-whatsapp:hover svg {
    color: white;
}

/* Phone */
.atr-float-phone {
    color: #4A5568;
}

.atr-float-phone svg {
    color: #4A5568;
}

.atr-float-phone:hover {
    background: var(--atr-float-primary);
    color: white;
}

.atr-float-phone:hover svg {
    color: white;
    stroke: white;
}

/* Book */
.atr-float-book {
    background: linear-gradient(135deg, var(--atr-float-primary), var(--atr-float-secondary));
    color: white;
    font-weight: 600;
}

.atr-float-book svg {
    color: white;
    stroke: white;
}

.atr-float-book:hover {
    background: linear-gradient(135deg, var(--atr-float-secondary), var(--atr-float-primary));
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* ============================================
   Label (text)
   ============================================ */
.atr-float-button-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: 0.01em;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
    .atr-float-buttons {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .atr-float-toggle {
        width: 52px;
        height: 52px;
    }

    .atr-float-button {
        padding: 10px 16px 10px 12px;
        font-size: 13px;
    }

    .atr-float-button svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .atr-float-buttons {
        bottom: 16px;
        right: 16px;
    }

    .atr-float-toggle {
        width: 48px;
        height: 48px;
    }

    /* Smaller buttons on very small screens */
    .atr-float-button {
        padding: 8px 14px 8px 10px;
        font-size: 12px;
        gap: 8px;
    }
}

/* ============================================
   Accessibility
   ============================================ */
.atr-float-toggle:focus,
.atr-float-button:focus {
    outline: 2px solid var(--atr-float-primary);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .atr-float-buttons,
    .atr-float-buttons *,
    .atr-float-toggle,
    .atr-float-menu,
    .atr-float-button {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================
   Dark Mode Support
   ============================================ */
@media (prefers-color-scheme: dark) {
    .atr-float-button {
        background: #2d3748;
        color: #e2e8f0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .atr-float-button:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }

    .atr-float-phone {
        color: #e2e8f0;
    }

    .atr-float-phone svg {
        color: #e2e8f0;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .atr-float-buttons {
        display: none !important;
    }
}
