/* Social Chat Bubble Plugin Styles */
:root {
    --scb-icon-size: 24px;
}

#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;
}

/* Hide button mode - no background, always visible */
#scb-chat-bubble.scb-no-button .scb-item-group,
#scb-chat-bubble-shortcode.scb-no-button .scb-item-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    position: static;
}

#scb-chat-bubble.scb-no-button .scb-chat-item,
#scb-chat-bubble-shortcode.scb-no-button .scb-chat-item {
    background: var(--bubble-color, #eb0f1e);
    border-radius: 50%;
    width: calc(var(--scb-icon-size) + 16px);
    height: calc(var(--scb-icon-size) + 16px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    padding: 0;
    border: none;
    margin: 0;
}

#scb-chat-bubble.scb-no-button .scb-chat-item:hover,
#scb-chat-bubble-shortcode.scb-no-button .scb-chat-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

#scb-chat-bubble.scb-no-button .scb-chat-item img,
#scb-chat-bubble-shortcode.scb-no-button .scb-chat-item img {
    width: var(--scb-icon-size);
    height: var(--scb-icon-size);
    filter: brightness(0) invert(1);
    margin: 0;
}

#scb-chat-bubble.scb-no-button .scb-chat-item-text,
#scb-chat-bubble-shortcode.scb-no-button .scb-chat-item-text {
    display: none;
}

/* Normal mode with button */
.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;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--bgColor);
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

.scb-chat-icon img {
    transition: opacity 0.3s ease;
}

.scb-close {
    position: absolute;
    opacity: 0;
    padding: 15px;
}

#scb-chat-bubble.active .scb-chat-icon-open,
#scb-chat-bubble-shortcode.active .scb-chat-icon-open {
    opacity: 0;
}

#scb-chat-bubble.active .scb-close,
#scb-chat-bubble-shortcode.active .scb-close {
    opacity: 1;
}

.scb-item-group {
    position: absolute;
    bottom: 70px;
    right: 0;
    min-width: 250px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.scb-chat-header {
    padding: 16px 20px 12px;
    background: var(--bubble-color, #eb0f1e);
    color: white;
}

.scb-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.scb-chat-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.scb-chat-item:last-child {
    border-bottom: none;
}

.scb-chat-item:hover {
    background-color: #f8f9fa;
}

.scb-chat-item img {
    width: var(--scb-icon-size);
    height: var(--scb-icon-size);
    margin-right: 12px;
    flex-shrink: 0;
}

.scb-chat-item-text {
    font-size: 14px;
    font-weight: 500;
}

/* Contact Form Modal */
.scb-bubble-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.scb-bubble-modal.active {
    display: flex;
}

.scb-bubble-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

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

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

.scb-modal-body {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.scb-contact-form {
    padding: 30px;
    overflow: auto;
}

.scb-contact-form h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
    text-align: center;
    font-weight: 600;
}

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

.scb-contact-form .wpcf7-form {
    margin: 0;
}

.scb-contact-form .wpcf7-form p {
    margin: 0 0 15px 0;
}

.scb-contact-form .wpcf7-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.scb-contact-form .wpcf7-form input[type="text"],
.scb-contact-form .wpcf7-form input[type="email"],
.scb-contact-form .wpcf7-form input[type="tel"],
.scb-contact-form .wpcf7-form input[type="url"],
.scb-contact-form .wpcf7-form textarea,
.scb-contact-form .wpcf7-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.scb-contact-form .wpcf7-form input:focus,
.scb-contact-form .wpcf7-form textarea:focus,
.scb-contact-form .wpcf7-form select: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-form textarea {
    min-height: 150px;
    resize: vertical;
}

.scb-contact-form .wpcf7-form input[type="submit"] {
    background: var(--bubble-color, #eb0f1e);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 10px;
}

.scb-contact-form .wpcf7-form input[type="submit"]:hover {
    background: rgba(235, 15, 30, 0.9);
    transform: translateY(-1px);
}

.scb-contact-form .wpcf7-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Contact Form 7 validation messages */
.scb-contact-form .wpcf7-not-valid-tip {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.scb-contact-form .wpcf7-validation-errors {
    background: #ffebee;
    border: 1px solid #f8bbd9;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    color: #721c24;
    font-size: 14px;
}

.scb-contact-form .wpcf7-mail-sent-ok {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    color: #2e7d32;
    font-size: 14px;
}

.scb-contact-form .wpcf7-spinner {
    margin: 0 10px;
}

/* Required field indicator */
.scb-contact-form .wpcf7-form .required {
    color: #dc3232;
}

/* Checkbox and radio styling */
.scb-contact-form .wpcf7-form input[type="checkbox"],
.scb-contact-form .wpcf7-form input[type="radio"] {
    width: auto;
    margin-right: 8px;
}

.scb-contact-form .wpcf7-form .wpcf7-list-item {
    margin: 0 0 10px 0;
}

.scb-contact-form .wpcf7-form .wpcf7-list-item label {
    display: inline;
    margin: 0;
    font-weight: normal;
}

/* File upload styling */
.scb-contact-form .wpcf7-form input[type="file"] {
    padding: 8px;
    border: 2px dashed #ddd;
    background: #f9f9f9;
}

.scb-contact-form .wpcf7-form input[type="file"]:hover {
    border-color: var(--bubble-color, #eb0f1e);
    background: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    #scb-chat-bubble, #scb-chat-bubble-shortcode {
        bottom: 15px;
        right: 15px;
    }
    
    .scb-item-group {
        min-width: 200px;
        right: -10px;
    }
    
    .scb-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    #scb-chat-bubble.scb-no-button .scb-chat-item,
    #scb-chat-bubble-shortcode.scb-no-button .scb-chat-item {
        width: calc(var(--scb-icon-size) + 12px);
        height: calc(var(--scb-icon-size) + 12px);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Focus styles for accessibility */
.scb-chat-icon:focus,
.scb-chat-item:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .scb-chat-item {
        border: 1px solid;
    }
}

