/**
 * Sky İletişim Bar - Frontend Styles v1.1
 * skyedu.com.tr renk paleti
 */

/* === Wrapper Görünürlük === */
.sky-cb-hide-desktop .sky-cb-desktop { display: none !important; }
.sky-cb-hide-mobile  .sky-cb-mobile  { display: none !important; }

/* ============================================
   MASAÜSTÜ - Sağ Kenara Yapışık (Expand on Hover)
   ============================================ */
.sky-cb-desktop {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* her buton sağ kenara yapışık kalır */
    gap: 12px;
    pointer-events: none; /* sadece butonlar tıklanabilir */
}

.sky-cb-side {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 58px;
    width: 58px;
    padding: 0;
    overflow: hidden;
    text-decoration: none !important;
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    border-radius: 30px 0 0 30px;
    box-shadow: -4px 6px 20px rgba(0, 0, 0, 0.15), -1px 2px 4px rgba(0, 0, 0, 0.06);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease,
                transform 0.3s ease;
    will-change: width;
}

.sky-cb-side:hover {
    width: 230px;
    box-shadow: -6px 10px 28px rgba(0, 0, 0, 0.22), -2px 3px 6px rgba(0, 0, 0, 0.08);
}

.sky-cb-side--whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #20BD5C 100%);
}

.sky-cb-side--phone {
    background: linear-gradient(135deg, #1a3a5c 0%, #234870 100%);
    border-left: 3px solid #F5C518;
    border-right: 0;
}

.sky-cb-side--phone:hover {
    background: linear-gradient(135deg, #234870 0%, #2c5687 100%);
}

.sky-cb-side-icon {
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.sky-cb-side-icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.sky-cb-side-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding-right: 22px;
    padding-left: 4px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.2s ease 0s, transform 0.3s ease 0s;
}

.sky-cb-side:hover .sky-cb-side-text {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.25s ease 0.12s, transform 0.3s ease 0.08s;
}

.sky-cb-side-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.sky-cb-side-sub {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    opacity: 0.88;
    letter-spacing: 0.1px;
}

/* WhatsApp pulse */
.sky-cb-side-pulse {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #25D366;
    z-index: 0;
    opacity: 0.5;
    animation: skyCbPulse 2.2s infinite cubic-bezier(0.4, 0, 0.6, 1);
    pointer-events: none;
}

.sky-cb-side-icon, .sky-cb-side-text {
    position: relative;
    z-index: 1;
}

@keyframes skyCbPulse {
    0%   { transform: translateY(-50%) scale(1);   opacity: 0.5; }
    70%  { transform: translateY(-50%) scale(1.7); opacity: 0;   }
    100% { transform: translateY(-50%) scale(1.7); opacity: 0;   }
}

/* Giriş animasyonu */
.sky-cb-side {
    animation: skyCbSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.sky-cb-side--whatsapp { animation-delay: 0.2s; }
.sky-cb-side--phone    { animation-delay: 0.35s; }

@keyframes skyCbSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ============================================
   MOBİL - Alt Sabit Bar
   ============================================ */
.sky-cb-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(26, 58, 92, 0.15);
    animation: skyCbSlideUp 0.4s ease-out;
}

/* 3 renkli üst şerit - kırmızı / mavi / sarı */
.sky-cb-mobile-stripe {
    height: 4px;
    width: 100%;
    background: linear-gradient(
        to right,
        #CA2628 0%,
        #CA2628 33.33%,
        #007DFC 33.33%,
        #007DFC 66.66%,
        #F9B03C 66.66%,
        #F9B03C 100%
    );
}

.sky-cb-mobile-inner {
    display: flex;
    padding: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
}

.sky-cb-mobile-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 12px;
    text-decoration: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    color: #ffffff !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
}

.sky-cb-mobile-btn:active {
    transform: scale(0.97);
}

.sky-cb-mobile-btn--whatsapp {
    background: #25D366;
}

.sky-cb-mobile-btn--phone {
    background: #1a3a5c;
}

.sky-cb-mobile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #ffffff;
}

.sky-cb-mobile-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.sky-cb-mobile-label {
    font-weight: 700;
    letter-spacing: 0.3px;
}

@keyframes skyCbSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sky-cb-desktop {
        display: none !important;
    }
    .sky-cb-mobile {
        display: block !important;
    }
    body {
        padding-bottom: 72px !important;
    }
}

@media (min-width: 769px) {
    .sky-cb-mobile {
        display: none !important;
    }
}

@media (max-width: 360px) {
    .sky-cb-mobile-btn {
        font-size: 13px;
        padding: 11px 6px;
    }
}
