/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
}

/* Chat widget container */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

/* Hide checkbox but use it for state management */
.chat-toggle {
    display: none;
}

/* Chat button styles */
.chat-button {
    display: block;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('/avtstatic/images/judy.png');
    background-size: cover;
    background-position: center;
    border: 3px solid #4CAF50;
}

.chat-button:hover {
    transform: scale(1.05);
}

/* Chat button inner container */
.chat-button-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Chat avatar image */
.chat-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Chat button text overlay */
.chat-button-text {
    position: absolute;
    bottom: 18%;
    left: 51%;
    transform: translateX(-50%);
    background-color: #7c3aed;
    color: white;
    padding: 8px 7px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Expanded chat window */
.chat-expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    width: 800px;
    min-height: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    z-index: 1001;
}

.chat-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-toggle:checked ~ .chat-overlay {
    display: block;
    opacity: 1;
}

/* Header container */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #4355f9;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0 auto;

}

.call-buttons {
    display: flex;
    gap: 15px;
    flex: 1;
}

.call-button, .video-call-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.call-button, .video-call-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.call-button:hover, .video-call-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.call-button.active {
    background: white;
    color: #4355f9;
}

.video-call-button.active {
    background: white;
    color: #4355f9;
}

.call-button-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-tabs input[type="radio"] {
    display: none;
}

.chat-tabs label {
    flex: 1;
    padding: 15px 30px;
    background: transparent;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.chat-tabs label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: white;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.chat-tabs input[type="radio"]:checked + label::after {
    transform: scaleX(1);
}

.tab-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.chat-tabs label:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.chat-tabs input[type="radio"]:checked + label {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

#start-call-button, #start-avatar-button {
    /* position: absolute;
    top:473px;
    left: 50%;
    transform: translateX(-50%); */
    background: #7c3aed;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#start-call-button:hover, #start-avatar-button:hover {
    background: #45a049;
    transform: translate(0, -50%) scale(1.05);
}

.call-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.tab-content {
    height: 100%;
}



#video-content, #call-content {
    height: 100%;
}
.pan-hide{
    display: none !important;
} 
/* 
#call-tab:checked ~ .tab-content #call-content {
    display: block;

}

#call-tab:checked ~ .tab-content #video-content {
    display: none;
}

#video-tab:checked ~ .tab-content #call-content {
    display: none;

}
#video-tab:checked ~ .tab-content #video-content {
    display: block;

} */

/* Chat iframe */
.chat-iframe {
    width: 100%;
    height: 100%;
    border: none;
    min-height: 550px;
}

/* Window controls */
.window-controls {
    /* position: absolute; */
    /* top: 1rem; */
    /* right: 1rem; */
    display: flex;
    gap: 8px;
    z-index: 10;
}

.fullscreen-toggle {
    width: 30px;
    height: 30px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 4px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fullscreen-toggle svg {
    width: 100%;
    height: 100%;
    fill: #6c757d;
    transition: fill 0.2s ease;
}

.fullscreen-toggle:hover svg {
    fill: #4CAF50;
}

.chat-expanded.fullscreen {
    width: 100vw;
    height: 100vh;
    position: fixed;
    right: 0;
    bottom: 0;
    border-radius: 0;
}

/* Close button */
#close-button {
    width: 28px;
    height: 28px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 6px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#close-button svg {
    width: 20px;
    height: 20px;
    fill: #6c757d;
    transition: all 0.3s ease;
}

#close-button:hover {
    background: #dc3545;
    transform: scale(1.1);
}

#close-button:hover svg {
    fill: white;
}

/* Fullscreen button */
.fullscreen-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.fullscreen-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.fullscreen-icon {
    width: 24px;
    height: 24px;
    fill: #6c757d;
}

.fullscreen-button:hover .fullscreen-icon {
    fill: #4CAF50;
}

/* State management using checkbox */
.chat-toggle:checked ~ .chat-button {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chat-toggle:checked ~ .chat-expanded {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.chat-toggle:checked ~ .chat-overlay {
    display: block;
}

/* End call button */
.end-call-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    z-index: 10;
}

.end-call-button:hover {
    background: #c82333;
    transform: scale(1.05);
}

.end-call-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Responsive design */
@media (max-width: 768px) {
    .chat-expanded {
        width: 90%;
        height: 80vh;
        max-height: 80vh;
        position: fixed;
        top: 60%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1) !important;
        border-radius: 12px;
        margin: auto;
        
    }
    .call-button-icon {
        display: inline;
    }

    .chat-overlay {
        background: rgba(0, 0, 0, 0.4);
    }

    .chat-widget {
        bottom: 1rem;
        right: 1rem;
    }

    .chat-button {
        width: 120px;
        height: 120px;
    }

    .header-container {
        padding: 12px;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    .header-container h2{
        font-size: 1.25rem;
    }

    .call-buttons {
        flex-direction: row;
        gap: 8px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        width: auto;
    }

    .call-button, .video-call-button {
        padding: 6px 10px;
        font-size: 12px;
        min-width: auto;
        flex: 0 1 auto;
    }

    .call-button-icon {
        width: 14px;
        height: 14px;
    }

    .chat-button-text {
        font-size: 12px;
        padding: 7px 7px;
    }

    .end-call-button {
        bottom: 10px;
        right: 10px;
        font-size: 12px;
        padding: 8px 16px;
    }

    .chat-expanded{
        height: fit-content  !important;
        overflow: auto;
        top: 50%  !important;
        transform: translate(-50%, -50%) scale(1) !important;
    }
    .call-type svg, .call-type img{
        width: 100% !important;
        height: 100px !important;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .chat-expanded {
        width: 90%;
        height: 70vh;
        border-radius: 12px;
    }

    .window-controls {
        /* position: absolute;
        top: 0.2rem;
        right: 0.2rem;
        z-index: 1002; */
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .window-controls button,
    .window-controls label {
        margin: 0;
    }

    .call-button, .video-call-button {
        padding: 5px 8px;
        font-size: 11px;
        white-space: nowrap;
    }

    .call-button-icon {
        width: 12px;
        height: 12px;
    }

    .end-call-button {
        padding: 6px 12px;
        font-size: 11px;
        bottom: 10px;
        right: 10px;
    }

    .header-container {
        padding: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 960px) {
    .chat-expanded {
        height: fit-content;
        overflow: auto;
    }
}
.options-div{
    display: flex;
    width: 90%;
    margin: auto;
    gap: 20px;
    margin-bottom: 20px;
}
.call-type-label{
    width: 50%;
    position: relative;
}
.call-type{
    text-align: center;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #d9d9d9;padding: 15px;
}
.call-type p{
    margin: 0;
    margin-bottom: 16px;
    font-size: 1.25rem;
}
.call-type img{
    height: 250px;
    width: 250px;
     object-fit: contain;
}
.call-type-label input{
    position: absolute;
     top: 11px;
                left: 20px;
                height: 28px;
width: 21px;

}
.pt-15{
    padding-top: 1.5rem ;
}
.mb-3{
    margin-bottom: 20px;
    display: flex;
justify-content: center;}

@media (max-width: 850px) {
    .chat-expanded{
        width: 90% !important;
    }
}
@media (max-width: 450px) {
    .call-type img, .call-type svg{
width: 100% !important;
    }
    .options-div{
        width: 100%;
    }
}
