/* Social Chat Bubble Plugin Styles */

#scb-chat-bubble, #scb-chat-bubble-shortcode {
    position: fixed;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Position classes */
.scb-position-bottom-right {
    bottom: 50px;
    right: 15px;
}

.scb-position-bottom-left {
    bottom: 50px;
    left: 15px;
}

.scb-position-top-right {
    top: 50px;
    right: 15px;
}

.scb-position-top-left {
    top: 50px;
    left: 15px;
}

/* Chat icon styles */
.scb-chat-icon {
    --bgColor: var(--bubble-color, #eb0f1e);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: var(--bgColor);
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    padding: 5px;
    position: relative;
    transition: transform .3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scb-chat-icon::before {
    content: "";
    position: absolute;
    z-index: 0;
    width: 60px;
    height: 60px;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    animation: scb-chat-button-play 3s infinite;
    background-color: var(--bgColor);
    border-radius: 50%;
    z-index: 1;
}

.scb-chat-icon img {
    width: 80%;
    height: auto;
    border-radius: 0;
    z-index: 2;
    position: relative;
}

.scb-chat-icon img.scb-close {
    display: none;
    width: 40%;
    opacity: 1;
}

/* Item group styles */
.scb-item-group {
    position: absolute;
    right: 0;
    background-color: #fff;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, .1);
    min-width: 200px;
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
    transform: translateY(10px);
}

/* Position-specific item group positioning */
.scb-position-bottom-right .scb-item-group,
.scb-position-bottom-left .scb-item-group {
    bottom: calc(100% + 10px);
}

.scb-position-top-right .scb-item-group,
.scb-position-top-left .scb-item-group {
    top: calc(100% + 10px);
}

.scb-position-bottom-left .scb-item-group,
.scb-position-top-left .scb-item-group {
    right: auto;
    left: 0;
}

.scb-chat-item {
    width: 200px;
    font-size: 13px;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color .3s ease;
    text-decoration: none;
    color: #333;
}

.scb-chat-item:not(:last-child) {
    border-bottom: 1px solid #f5f5f5;
}

.scb-chat-item img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.scb-chat-item-text {
    margin-left: 10px;
    color: #333;
    transition: all .3s ease;
    flex: 1;
}

.scb-chat-item:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.scb-chat-item:hover .scb-chat-item-text {
    color: var(--bubble-color, #eb0f1e);
}

/* Arrow for item group */
.scb-item-group::before {
    position: absolute;
    display: inline-block !important;
    border-right: 8px solid rgba(0, 0, 0, 0);
    border-left: 8px solid rgba(0, 0, 0, 0);
    content: "";
}

.scb-position-bottom-right .scb-item-group::before,
.scb-position-bottom-left .scb-item-group::before {
    bottom: -7px;
    border-top: 8px solid #fff;
}

.scb-position-top-right .scb-item-group::before,
.scb-position-top-left .scb-item-group::before {
    top: -7px;
    border-bottom: 8px solid #fff;
}

.scb-position-bottom-right .scb-item-group::before,
.scb-position-top-right .scb-item-group::before {
    right: 25px;
}

.scb-position-bottom-left .scb-item-group::before,
.scb-position-top-left .scb-item-group::before {
    left: 25px;
}

/* Modal styles */
.scb-bubble-modal {
    position: absolute;
    right: 0;
    z-index: 1055;
    outline: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, .15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* Position-specific modal positioning */
.scb-position-bottom-right .scb-bubble-modal,
.scb-position-bottom-left .scb-bubble-modal {
    bottom: calc(100% + 1rem);
}

.scb-position-top-right .scb-bubble-modal,
.scb-position-top-left .scb-bubble-modal {
    top: calc(100% + 1rem);
}

.scb-position-bottom-left .scb-bubble-modal,
.scb-position-top-left .scb-bubble-modal {
    right: auto;
    left: 0;
}

.scb-bubble-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scb-bubble-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    background-color: #fff;
    padding: 0;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.scb-bubble-modal-close svg {
    width: 16px;
    height: 16px;
}

.scb-bubble-modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.scb-modal-body {
    background-color: #fff;
    width: 350px;
    max-width: 90vw;
    height: auto;
    padding: 2rem 1.5rem 1.5rem;
}

.scb-contact-form h3 {
    margin: 0 0 1.5rem 0;
    font-weight: 600;
    font-size: 1.2rem;
    text-align: center;
    color: #333;
}

/* Contact Form 7 styling within modal */
.scb-contact-form .wpcf7-form {
    margin: 0;
}

.scb-contact-form .wpcf7-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.scb-contact-form .wpcf7-form-control:focus {
    outline: none;
    border-color: var(--bubble-color, #eb0f1e);
    box-shadow: 0 0 0 2px rgba(235, 15, 30, 0.1);
}

.scb-contact-form .wpcf7-textarea {
    min-height: 100px;
    resize: vertical;
}

.scb-contact-form .wpcf7-submit {
    background-color: var(--bubble-color, #eb0f1e);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.scb-contact-form .wpcf7-submit:hover {
    background-color: var(--bubble-color, #d00e1a);
    transform: translateY(-1px);
}

.scb-contact-form .wpcf7-response-output {
    margin: 15px 0 0 0;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
}

/* Active state */
#scb-chat-bubble.active .scb-chat-icon,
#scb-chat-bubble-shortcode.active .scb-chat-icon {
    transform: scale(0.9);
}

#scb-chat-bubble.active .scb-chat-icon::before,
#scb-chat-bubble-shortcode.active .scb-chat-icon::before {
    display: none;
}

#scb-chat-bubble.active .scb-chat-icon img.scb-chat-icon-open,
#scb-chat-bubble-shortcode.active .scb-chat-icon img.scb-chat-icon-open {
    display: none;
}

#scb-chat-bubble.active .scb-chat-icon img.scb-close,
#scb-chat-bubble-shortcode.active .scb-chat-icon img.scb-close {
    display: block;
}

#scb-chat-bubble.active .scb-item-group,
#scb-chat-bubble-shortcode.active .scb-item-group {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Animation */
@keyframes scb-chat-button-play {
    0% {
        opacity: .25;
        width: 96%;
        height: 96%;
    }
    40% {
        opacity: .25;
    }
    100% {
        opacity: 0;
        width: 150%;
        height: 150%;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .scb-modal-body {
        width: 300px;
        padding: 1.5rem 1rem;
    }
    
    .scb-item-group {
        min-width: 180px;
    }
    
    .scb-chat-item {
        width: 180px;
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .scb-chat-item img {
        width: 20px;
        height: 20px;
    }
}

/* Accessibility */
.scb-chat-icon:focus,
.scb-chat-item:focus,
.scb-bubble-modal-close:focus {
    outline: 2px solid var(--bubble-color, #eb0f1e);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .scb-chat-icon {
        border: 2px solid #000;
    }
    
    .scb-item-group {
        border: 1px solid #000;
    }
    
    .scb-bubble-modal {
        border: 1px solid #000;
    }
}

