/* =============================================
   Cairo Floating Contact - Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

/* --- Backdrop --- */
.cfc-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999998;
    pointer-events: none;
}

.cfc-backdrop.cfc-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* --- Container --- */
.cfc-floating-container {
    position: fixed;
    bottom: 30px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
}

.cfc-position-left {
    left: 30px;
}

.cfc-position-right {
    right: 30px;
    align-items: flex-end;
}

/* --- Popup --- */
.cfc-popup {
    position: absolute;
    bottom: 80px;
    width: 290px;
    background: #2a1f14;
    border: 1px solid rgba(200, 149, 108, 0.2);
    border-radius: 20px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(200, 149, 108, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cfc-position-left .cfc-popup {
    left: 0;
    transform-origin: bottom left;
}

.cfc-position-right .cfc-popup {
    right: 0;
    transform-origin: bottom right;
}

.cfc-popup.cfc-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Popup Header */
.cfc-popup-header {
    background: linear-gradient(135deg, #a87450, #c8956c, #ddb08a);
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
}

.cfc-popup-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cfc-popup-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cfc-popup-header h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px 0;
    padding: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    line-height: 1.4;
    border: none;
    background: none;
}

.cfc-popup-header p {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

/* Popup Body */
.cfc-popup-body {
    padding: 12px;
}

/* Contact Option */
.cfc-option {
    display: flex !important;
    align-items: center !important;
    gap: 14px;
    padding: 14px 16px !important;
    border-radius: 14px !important;
    text-decoration: none !important;
    color: #f5f0eb !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.cfc-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(200, 149, 108, 0.1), rgba(200, 149, 108, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.cfc-option:hover::before {
    opacity: 1;
}

.cfc-option:hover {
    transform: translateX(-4px);
    color: #f5f0eb !important;
}

.cfc-option:hover .cfc-option-icon {
    transform: scale(1.1);
}

.cfc-option:focus {
    outline: none !important;
    box-shadow: none !important;
}

.cfc-option + .cfc-option {
    margin-top: 4px !important;
}

/* Option Icon */
.cfc-option-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.cfc-option-icon svg {
    width: 26px;
    height: 26px;
}

.cfc-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c3e) !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.cfc-phone {
    background: linear-gradient(135deg, #c8956c, #a87450) !important;
    box-shadow: 0 4px 15px rgba(200, 149, 108, 0.35);
}

/* Option Info */
.cfc-option-info {
    flex: 1;
    min-width: 0;
}

.cfc-option-info .cfc-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f5f0eb;
    margin-bottom: 2px;
    line-height: 1.3;
}

.cfc-option-info .cfc-number {
    font-size: 0.75rem;
    font-weight: 400;
    color: #b8a898;
    direction: ltr;
    text-align: right;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

/* Arrow */
.cfc-arrow {
    color: #b8a898;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.cfc-option:hover .cfc-arrow {
    color: #c8956c;
    transform: translateX(-4px);
}

/* Popup Footer */
.cfc-popup-footer {
    padding: 0 16px 14px;
    text-align: center;
}

.cfc-popup-footer span {
    font-size: 0.68rem;
    color: #b8a898;
    opacity: 0.6;
}

/* --- FAB Button --- */
.cfc-fab {
    width: 62px !important;
    height: 62px !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, #c8956c, #a87450) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow:
        0 6px 25px rgba(200, 149, 108, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.5) !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    min-width: unset !important;
    min-height: unset !important;
}

.cfc-fab:hover {
    transform: scale(1.08) !important;
    box-shadow:
        0 8px 35px rgba(200, 149, 108, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.cfc-fab:active {
    transform: scale(0.95) !important;
}

.cfc-fab.cfc-active {
    background: linear-gradient(135deg, #342818, #2a1f14) !important;
    box-shadow:
        0 6px 25px rgba(0, 0, 0, 0.5),
        0 0 0 2px rgba(200, 149, 108, 0.3) !important;
}

/* FAB Icons */
.cfc-fab-icon {
    position: absolute;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cfc-icon-contact {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.cfc-icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.cfc-fab.cfc-active .cfc-icon-contact {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.cfc-fab.cfc-active .cfc-icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* --- Pulse Ring --- */
.cfc-pulse-ring {
    position: absolute;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 2px solid #c8956c;
    animation: cfc-pulse 2.5s ease-out infinite;
    pointer-events: none;
    bottom: 0;
}

.cfc-position-left .cfc-pulse-ring {
    left: 0;
}

.cfc-position-right .cfc-pulse-ring {
    right: 0;
}

.cfc-pulse-delay {
    animation-delay: 0.8s;
}

.cfc-fab.cfc-active ~ .cfc-pulse-ring {
    animation: none;
    opacity: 0;
}

@keyframes cfc-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* --- Online Dot --- */
.cfc-online-dot {
    position: absolute;
    top: 2px;
    width: 14px;
    height: 14px;
    background: #25d366;
    border-radius: 50%;
    border: 2.5px solid #1a1209;
    z-index: 11;
    animation: cfc-online-pulse 2s ease infinite;
    pointer-events: none;
}

.cfc-position-left .cfc-online-dot {
    right: 2px;
}

.cfc-position-right .cfc-online-dot {
    left: 2px;
}

.cfc-fab.cfc-active ~ .cfc-online-dot {
    opacity: 0;
    transition: opacity 0.2s ease;
}

@keyframes cfc-online-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 0 0 5px rgba(37, 211, 102, 0); }
}

/* --- Tooltip --- */
.cfc-tooltip {
    position: absolute;
    bottom: 16px;
    background: #342818;
    color: #f5f0eb;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 10px;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(200, 149, 108, 0.15);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    animation: cfc-tooltip-show 0.5s ease 2s forwards;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    z-index: 10;
}

.cfc-position-left .cfc-tooltip {
    left: 76px;
    transform: translateX(-10px);
}

.cfc-position-left .cfc-tooltip::before {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #342818;
    border-right: 1px solid rgba(200, 149, 108, 0.15);
    border-top: 1px solid rgba(200, 149, 108, 0.15);
}

.cfc-position-right .cfc-tooltip {
    right: 76px;
    transform: translateX(10px);
}

.cfc-position-right .cfc-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #342818;
    border-left: 1px solid rgba(200, 149, 108, 0.15);
    border-bottom: 1px solid rgba(200, 149, 108, 0.15);
}

@keyframes cfc-tooltip-show {
    0% { opacity: 0; }
    100% { opacity: 1; transform: translateX(0); }
}

.cfc-fab.cfc-active ~ .cfc-tooltip {
    opacity: 0 !important;
}

/* --- Stagger Animations --- */
.cfc-popup.cfc-active .cfc-option:nth-child(1) {
    animation: cfc-slide-in 0.4s ease 0.1s both;
}

.cfc-popup.cfc-active .cfc-option:nth-child(2) {
    animation: cfc-slide-in 0.4s ease 0.2s both;
}

@keyframes cfc-slide-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .cfc-floating-container {
        bottom: 20px;
    }
    .cfc-position-left {
        left: 20px;
    }
    .cfc-position-right {
        right: 20px;
    }
    .cfc-popup {
        width: 265px;
    }
    .cfc-tooltip {
        display: none !important;
    }
}
