/* GuardianContact Styles */
.gc-container {
    position: fixed;
    bottom: var(--gc-offset);
    right: var(--gc-offset);
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Toggle Button */
.gc-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--gc-main-color);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Animations */
@keyframes gcSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes gcFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes gcBounce {
    0% {
        transform: scale(0.1);
        opacity: 0;
    }

    60% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

.gc-anim-slide-up {
    animation: gcSlideUp 0.5s ease-out;
}

.gc-anim-fade-in {
    animation: gcFadeIn 0.5s ease-out;
}

.gc-anim-bounce {
    animation: gcBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Chat Box */
.gc-chat-box {
    width: 350px;
    background: var(--gc-bg-color, #fff);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    display: none;
    /* Toggled by JS */
    flex-direction: column;
}

.gc-chat-box.open {
    display: flex;
}

/* Header */
.gc-header {
    background: var(--gc-main-color);
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gc-agent-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gc-agent-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.gc-agent-text {
    display: flex;
    flex-direction: column;
}

.gc-agent-name {
    font-weight: 600;
    font-size: 16px;
}

.gc-status-text {
    font-size: 12px;
    opacity: 0.9;
}

.gc-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

/* Body */
.gc-body {
    padding: 20px;
    background: #f9f9f9;
}

.gc-message-bubble {
    background: #e6f7ff;
    padding: 12px 15px;
    border-radius: 12px 12px 12px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #444;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Footer & Form */
.gc-footer {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
}

.gc-footer input,
.gc-footer textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.gc-footer textarea {
    height: 80px;
    resize: vertical;
}

.gc-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gc-main-color);
    color: #fff;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.2s;
}

.gc-action-btn:hover {
    filter: brightness(90%);
}

.gc-captcha-row,
.gc-gdpr-row {
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.gc-gdpr-row label {
    display: inline;
}

.gc-gdpr-row input[type="checkbox"] {
    margin-right: 5px;
}

/* Toggle Button */
.gc-toggle-btn {
    background: var(--gc-main-color);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.gc-toggle-btn:hover {
    transform: scale(1.05);
}

.gc-toggle-btn svg {
    width: 30px;
    height: 30px;
}

/* ========== THEMES ========== */

/* Dark Theme */
.gc-theme-dark .gc-chat-box {
    background: #1f1f1f;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.gc-theme-dark .gc-body {
    background: #2d2d2d;
}

.gc-theme-dark .gc-message-bubble {
    background: #333;
    color: #e0e0e0;
    box-shadow: none;
}

.gc-theme-dark .gc-footer {
    background: #1f1f1f;
    border-top: 1px solid #333;
}

.gc-theme-dark .gc-footer input,
.gc-theme-dark .gc-footer textarea {
    background: #2d2d2d;
    border: 1px solid #444;
    color: #fff;
}

.gc-theme-dark .gc-gdpr-row,
.gc-theme-dark .gc-captcha-row {
    color: #aaa;
}

/* Glassmorphism Theme */
.gc-theme-glass .gc-chat-box {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.gc-theme-glass .gc-body {
    background: transparent;
}

.gc-theme-glass .gc-message-bubble {
    background: rgba(255, 255, 255, 0.7);
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.gc-theme-glass .gc-footer {
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.gc-theme-glass .gc-header {
    background: var(--gc-main-color);
    /* Or semi-transparent header if desired: background: rgba(var(--gc-main-rgb), 0.85); */
}

/* Modern Rounded Theme */
.gc-theme-modern .gc-chat-box {
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.gc-theme-modern .gc-header {
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    padding: 20px;
}

.gc-theme-modern .gc-body {
    padding: 25px;
}

.gc-theme-modern .gc-message-bubble {
    border-radius: 20px 20px 20px 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.gc-theme-modern .gc-footer input,
.gc-theme-modern .gc-footer textarea {
    border-radius: 12px;
    padding: 12px;
    background: #fdfdfd;
    border: 1px solid #eaeaea;
}

.gc-theme-modern .gc-action-btn {
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    /* Uses green shadow by default, JS updates might set variable */
}


/* Mobile Responsive */
@media (max-width: 480px) {
    .gc-chat-box {
        width: 90vw;
        max-width: 350px;
        padding: 5px;
    }

    /* Icon Only Mode - Chat Logic overrides */
    .gc-icon-only-mobile.gc-container.gc-open .gc-chat-box {
        /* On very small screen we might want full screen or just centered */
    }
}