/* RAN Contact Button — Frontend CSS */

/* ── WIDGET CONTAINER ── */
#ran-contact-widget {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

/* ── POSITIONS ── */
#ran-contact-widget.pos-bottom-right {
    bottom: var(--ran-bottom, 24px);
    right:  var(--ran-side,   24px);
    align-items: flex-end;
}
#ran-contact-widget.pos-bottom-left {
    bottom: var(--ran-bottom, 24px);
    left:   var(--ran-side,   24px);
    align-items: flex-start;
}
#ran-contact-widget.pos-bottom-center {
    bottom: var(--ran-bottom, 24px);
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    flex-direction: row;
    gap: 10px;
}

/* ── BASE BUTTON ── */
.ran-float-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    pointer-events: all;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    border: none;
    outline: none;
    position: relative;
}
.ran-float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}
.ran-float-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ── SIZES ── */
.ran-size-small  { font-size: 12px; padding: 8px  14px; }
.ran-size-medium { font-size: 13px; padding: 11px 18px; }
.ran-size-large  { font-size: 15px; padding: 14px 22px; }

.ran-float-btn svg { flex-shrink: 0; }

/* ── PULSE ANIMATION ── */
.ran-pulse {
    position: relative;
}
.ran-pulse::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: inherit;
    opacity: 0;
    animation: ran-pulse-ring 2.2s ease-out infinite;
    z-index: -1;
}
@keyframes ran-pulse-ring {
    0%   { transform: scale(1);   opacity: 0.5; }
    70%  { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* ── TOOLTIP ── */
.ran-tooltip-wrap {
    position: relative;
    pointer-events: all;
}
.ran-tooltip-text {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11,25,41,0.95);
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    padding: 6px 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
    border: 0.5px solid rgba(201,169,110,0.3);
    font-family: 'DM Sans', sans-serif;
}
.ran-tooltip-text::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(11,25,41,0.95);
}
.ran-tooltip-wrap:hover .ran-tooltip-text { opacity: 1; }

/* ── TOOLTIP LEFT POSITION ── */
.pos-bottom-left .ran-tooltip-text {
    left: calc(100% + 12px);
    right: auto;
}
.pos-bottom-left .ran-tooltip-text::after {
    right: 100%;
    left: auto;
    border-left-color: transparent;
    border-right-color: rgba(11,25,41,0.95);
}

/* ── ENTER ANIMATION ── */
@keyframes ran-slide-in-right {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes ran-slide-in-left {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes ran-slide-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ran-float-btn {
    animation-duration: 0.5s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pos-bottom-right .ran-float-btn    { animation-name: ran-slide-in-right; }
.pos-bottom-left  .ran-float-btn    { animation-name: ran-slide-in-left; }
.pos-bottom-center .ran-float-btn   { animation-name: ran-slide-in-up; }
.ran-float-btn:nth-child(2) { animation-delay: 0.1s; }
.ran-float-btn:nth-child(3) { animation-delay: 0.2s; }

/* ── HIDE ON DEVICE ── */
@media (min-width: 961px) {
    #ran-contact-widget.ran-hide-desktop { display: none !important; }
}
@media (max-width: 960px) {
    #ran-contact-widget.ran-hide-mobile { display: none !important; }
}

/* ── SHORTCODE BUTTONS ── */
.ran-shortcode-btns {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.ran-sc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.25s, transform 0.2s;
    border-radius: 0;
}
.ran-sc-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}
