/* Widget blur + container */
@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
    .c-call-and-chat-widget {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        background-color: rgba(255, 255, 255, 0.5);
    }
}

.c-call-and-chat-widget {
    bottom: 96px;
    padding: 4.8px 4.8px 4.8px 4.8px; /* .3rem */
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
}

.c-call-and-chat-widget .blur-bg-gray {
    background: linear-gradient(
        45deg,
        rgba(203, 213, 224, 0.7) 0%,
        rgba(255, 255, 255, 0.5) 90%
    );
    border-radius: 15px;
}

@media (min-width: 640px) {
    .c-call-and-chat-widget {
        padding: 4.8px 4.8px 4.8px 12.8px; /* .3rem .3rem .3rem .8rem */
    }

    .c-call-and-chat-widget .blur-bg-gray {
        min-width: 144px; /* 9rem */
    }
}

/* OUTER WRAPPER
   Replaces: fixed right-0 z-20 mb-0 mr-2 shadow-lg (rounded handled elsewhere) */
.ccw-widget {
    position: fixed;
    right: 0;
    bottom: 96px;
    margin-right: 8px; /* 0.5rem */
    margin-bottom: 0;
    z-index: 20;

    /* shadow-lg from Tailwind */
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* INNER CONTAINER
   Replaces: flex flex-col items-stretch pt-2 md:pt-16 px-1 md:pr-2 md:pl-0 pb-1 md:ml-6 relative */
.ccw-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;

    padding-top: 8px;   /* 0.5rem */
    padding-right: 4px; /* 0.25rem */
    padding-bottom: 4px;/* 0.25rem */
    padding-left: 4px;  /* 0.25rem */
    margin-left: 0;
}

@media (min-width: 768px) {
    .ccw-inner {
        padding-top: 64px;  /* 4rem */
        padding-right: 8px; /* 0.5rem */
        padding-left: 0;
        margin-left: 24px;  /* 1.5rem */
    }
}

/* HEADER (AVATAR + TEXT)
   Replaces: absolute top-0 -ml-10 hidden md:flex items-center */
.ccw-header {
    position: absolute;
    top: 0;
    margin-left: -40px; /* -2.5rem */
    display: none;
    align-items: center;
}

@media (min-width: 768px) {
    .ccw-header {
        display: flex;
    }
}

.ccw-avatar-wrapper {
    display: flex;
    align-items: center;
}

/* AVATAR CONTAINER */
.ccw-avatar {
    margin-top: -8px;    /* -0.5rem */
    margin-left: -4px;   /* -0.25rem */
    flex-shrink: 0;
    position: relative;
    display: inline-block;
    height: 64px;        /* 4rem */
    width: 64px;         /* 4rem */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    background-color: transparent;
}

/* ONLINE DOT */
.ccw-status-dot {
    position: absolute;
    top: 0;
    left: 0;
    margin-top: 4px;    /* 0.25rem */
    margin-left: 8px;   /* 0.5rem */
    width: 8px;         /* 0.5rem */
    height: 8px;        /* 0.5rem */
    border-radius: 9999px;
    background-color: #008bff; /* blue-600 */
}

/* AVATAR IMAGE */
.ccw-avatar-image {
    padding: 4px;          /* 0.25rem */
    border-radius: 20px;
    background-color: transparent;
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
}

/* HEADER TEXT */
.ccw-header-text {
    font-size: 16px;     /* 1rem */
    line-height: 1;
    font-weight: 700;
    margin: 0;
    padding-right: 4px;  /* 0.25rem */
    padding-left: 4px;   /* 0.25rem */
}

/* BUTTONS */
.ccw-button {
    display: inline-flex;
    align-items: stretch;

    border-width: 2px;
    border-style: solid;
    border-color: #dd6b20; /* border-orange-600 */

    color: #ffffff;
    font-family: barlow, Arial Narrow, sans-serif;
    font-size: 14px;       /* 0.875rem */
    line-height: 20px;     /* 1.25rem */

    border-radius: 4px;    /* 0.25rem */
    margin-bottom: 8px;    /* 0.5rem */
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    background-color: transparent;
}

@media (min-width: 768px) {
    .ccw-button {
        font-weight: 700;
        margin-left: -24px;   /* -1.5rem */
    }
}

.ccw-button:hover {
    background-color: #dd6b20; /* bg-orange-600 */
    text-decoration: none;
}

.ccw-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* SVG ICON BLOCK */
.ccw-button-icon {
    background-color: #dd6b20; /* bg-orange-600 */
    height: 32px;
    width: auto;
    fill: black;
    flex-shrink: 0;
}

/* LABEL AREA */
.ccw-button-label {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: #1a202c;
    flex: 1 1 auto;
}

/* Inner label span */
.ccw-button-label-inner {
    align-self: center;
    padding-left: 8px;
    padding-right: 8px;
}

/* DESKTOP vs MOBILE LABELS */
.ccw-label-desktop {
    display: none;
}

.ccw-label-mobile {
    display: inline-block;
    width: 40px;
    text-align: center;
}

@media (min-width: 768px) {
    .ccw-label-desktop {
        display: inline-block;
    }

    .ccw-label-mobile {
        display: none;
    }
}

/* Hover effect on label */
.ccw-button:hover .ccw-button-label {
    background-color: #dd6b20;
    color: #ffffff;
}

/* ========== MODAL STYLES ========== */

/* OVERLAY */
.ccs-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 24px;   /* py-6 */
    padding-bottom: 24px;
    z-index: 50;
}

/* MODAL CONTAINER */
.ccs-modal {
    position: relative;
    background-color: #ffffff;
    width: 100%;
    height: auto;
    max-width: 1024px;  /* max-w-screen-lg */
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow-xl */
    border-radius: 20px;
    margin-right: 12px;
    margin-left: 8px;
}

/* HEIGHT UTILS */
.ccs-h-auto {
    height: auto;
}

.ccs-h-full {
    height: 100%;
}

.ccs-overflow-y-auto {
    overflow-y: auto;
}

/* CLOSE BUTTON */
.ccs-close-btn {
    position: absolute;
    top: -16px;     /* -mt-4 */
    right: -12px;   /* -mr-3 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1a202c !important; /* bg-gray-900 */
    border: 1px solid #05143a; /* border-blue-900 */
    color: #ffffff;
    padding: 4px;   /* p-1 */
    border-radius: 9999px;
    cursor: pointer;
    outline: none;
}

.ccs-close-btn:hover {
    background-color: #ed8936; /* hover:bg-orange-500 */
    color: #ffffff;
}

.ccs-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

.ccs-close-icon {
    height: 32px;
    width: 32px;
    fill: currentColor;
}

/* MODAL CONTENT WRAPPER */
.ccs-modal-content {
    width: 100%;
    height: 100%;
}

/* TOP BANNER */
.ccs-banner {
    display: none;
    background-color: #f7fafc; /* bg-gray-100 */
    border-bottom: 1px solid #e2e8f0;
    padding-top: 16px;
    padding-bottom: 8px;
    padding-left: 16px;
    padding-right: 16px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    font-size: 16px;
    line-height: 24px;
}

@media (min-width: 768px) {
    .ccs-banner {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
}

/* AVATAR LIST */
.ccs-avatar-list {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .ccs-avatar-list {
        flex-basis: 33.3333%;
        max-width: 33.3333%;
        padding-right: 24px;
    }
}

@media (min-width: 1024px) {
    .ccs-avatar-list {
        flex-basis: 25%;
        max-width: 25%;
        margin-top: 4px;
        margin-bottom: 4px;
    }
}

/* INDIVIDUAL AVATAR */
.ccs-avatar {
    margin-top: -8px;
    position: relative;
    display: inline-block;
    height: 64px;
    width: 64px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 2px #ffffff;
    transform: scale(0.9);
    transition: transform 0.2s ease-in-out;
    cursor: help;
}

/* overlap effect */
.ccs-avatar + .ccs-avatar {
    margin-left: -8px;
}

.ccs-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ccs-avatar:hover {
    transform: scale(1);
}

/* BANNER TEXT */
.ccs-banner-text {
    flex: 1 1 0%;
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .ccs-banner-text {
        padding-right: 8px;
    }
}
