/* ── Floating Contact Shelf v1.2 ── */

:root {
    --fcs-phone-bg:   #38bdf8;
    --fcs-phone-ic:   #0d1b2a;
    --fcs-email-bg:   #38bdf8;
    --fcs-email-ic:   #0d1b2a;
    --fcs-close-ic:   #38bdf8;
    --fcs-shelf-bg:   #0d1b2a;
    --fcs-shelf-acc:  #38bdf8;
    --fcs-text:       #e2e8f0;
    --fcs-muted:      #94a3b8;
    --fcs-shelf-w:    220px;
    --fcs-btn-size:   46px;
    --fcs-peek:       23px;
    --fcs-radius:     50%;
    --fcs-shelf-rad:  11px;
    --fcs-z:          9999;
}

/* ── Wrap — column of 2 units, half hidden ── */
.fcs-wrap {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--fcs-z);
    display: flex;
    flex-direction: column;
    gap: 0;
    pointer-events: none;
    transition: right .25s ease, left .25s ease;
}

.fcs-right { right: calc(-1 * var(--fcs-peek)); }
.fcs-left  { left:  calc(-1 * var(--fcs-peek)); }

/* Hover — poora bahar (koi shelf open na ho) */
.fcs-right:not(.fcs-any-open):hover { right: 0; }
.fcs-left:not(.fcs-any-open):hover  { left:  0; }

/* Jab koi bhi shelf open ho — wrap puri bahar */
.fcs-right.fcs-any-open { right: 0; }
.fcs-left.fcs-any-open  { left:  0; }

/* ── Each Unit — height = button only, shelf absolute ── */
.fcs-unit {
    pointer-events: all;
    position: relative;
    width: var(--fcs-btn-size);
    height: var(--fcs-btn-size);
}

/* ── Toggle Button ── */
.fcs-toggle {
    width: var(--fcs-btn-size);
    height: var(--fcs-btn-size);
    border-radius: var(--fcs-radius);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    position: relative;
    z-index: 1;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 3px 14px rgba(0,0,0,.35);
}

/* Phone button colors */
.fcs-phone-toggle {
    background: var(--fcs-phone-bg);
    color: var(--fcs-phone-ic);
}
/* Email button colors */
.fcs-email-toggle {
    background: var(--fcs-email-bg);
    color: var(--fcs-email-ic);
}

.fcs-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0,0,0,.45);
}

/* Open state — X icon dikhao, close color lagao */
.fcs-unit.fcs-open .fcs-toggle {
    background: var(--fcs-shelf-bg);
    color: var(--fcs-close-ic);
    border: 1px solid rgba(255,255,255,.12);
}

/* Icon show/hide */
.fcs-icon-close-state { display: none; }
.fcs-icon-open-state  { display: flex; }
.fcs-unit.fcs-open .fcs-icon-close-state { display: flex; }
.fcs-unit.fcs-open .fcs-icon-open-state  { display: none; }

/* ── Shelf — absolute, doesn't affect unit height ── */
.fcs-shelf {
    pointer-events: none;
    position: absolute;
    top: 50%;
    width: var(--fcs-shelf-w);
    background: var(--fcs-shelf-bg);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--fcs-shelf-rad);
    overflow: hidden;
    opacity: 0;
    transition: opacity .24s ease, transform .24s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 6px 30px rgba(0,0,0,.5);
    z-index: 2;
}

.fcs-right .fcs-shelf {
    right: calc(var(--fcs-btn-size) + 8px);
    transform: translateY(-50%) scaleX(0.86);
    transform-origin: right center;
}
.fcs-left .fcs-shelf {
    left: calc(var(--fcs-btn-size) + 8px);
    transform: translateY(-50%) scaleX(0.86);
    transform-origin: left center;
}

.fcs-unit.fcs-open .fcs-shelf {
    pointer-events: all;
    opacity: 1;
}
.fcs-right .fcs-unit.fcs-open .fcs-shelf { transform: translateY(-50%) scaleX(1); }
.fcs-left  .fcs-unit.fcs-open .fcs-shelf { transform: translateY(-50%) scaleX(1); }

/* ── Contact Item inside shelf ── */
.fcs-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    text-decoration: none !important;
    color: var(--fcs-text) !important;
    transition: background .16s ease;
    position: relative;
}
.fcs-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--fcs-shelf-acc);
    opacity: 0;
    transition: opacity .16s;
    border-radius: 0 2px 2px 0;
}
.fcs-item:hover { background: rgba(255,255,255,.05); }
.fcs-item:hover::before { opacity: 1; }

/* icon circle */
.fcs-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: var(--fcs-shelf-acc);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* text */
.fcs-item-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}
.fcs-item-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--fcs-muted);
    text-transform: uppercase;
    line-height: 1;
}
.fcs-item-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--fcs-text);
    line-height: 1.4;
    /* Word wrap for long emails */
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .fcs-wrap, .fcs-shelf, .fcs-toggle { transition: none; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
    :root {
        --fcs-shelf-w:  190px;
        --fcs-btn-size: 42px;
        --fcs-peek:     21px;
    }
}
