#s-one-general-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

#s-one-gc-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

#s-one-gc-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.s-one-gc-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#s-one-general-chat-widget.open .s-one-gc-window {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.s-one-gc-header {
    background: #0073aa;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.s-one-gc-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

#s-one-gc-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin: 0;
    transition: color 0.2s;
}

#s-one-gc-close:hover {
    color: #fff;
}

#s-one-gc-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fff;
}

.s-one-gc-footer {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    display: flex;
    align-items: center;
}

#s-one-gc-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    transition: all 0.2s;
}

#s-one-gc-input:focus {
    background: #fff;
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#s-one-gc-send {
    margin-left: 10px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

#s-one-gc-send:hover {
    opacity: 0.9;
}

#s-one-gc-send .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.s-one-msg {
    margin-bottom: 15px;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.s-one-msg.user {
    background: #0073aa;
    /* Fallback, dynamically overridden usually */
    margin-left: auto;
    color: #fff;
    border-bottom-right-radius: 2px;
}

.s-one-msg.ai {
    background: #f0f2f5;
    margin-right: auto;
    color: #1c1e21;
    border-bottom-left-radius: 2px;
    border: none;
}

.s-one-msg.system {
    background: #f0f2f5;
    color: #555;
    margin-right: auto;
}

.s-one-msg.error {
    color: #d32f2f;
    font-size: 12px;
    text-align: center;
    background: none;
    box-shadow: none;
    padding: 0;
}

.s-one-msg.loading {
    color: #999;
    font-style: italic;
    font-size: 12px;
    background: none;
    box-shadow: none;
    padding: 0;
}

#s-one-gc-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s;
}

#s-one-gc-toggle:hover {
    transform: scale(1.05);
}

.s-one-gc-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#s-one-general-chat-widget.open .s-one-gc-window {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.s-one-gc-header {
    background: #0073aa;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s-one-gc-header h3 {
    margin: 0;
    font-size: 16px;
}

#s-one-gc-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

#s-one-gc-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
}

.s-one-gc-footer {
    padding: 10px;
    border-top: 1px solid #eee;
    background: #fff;
    display: flex;
}

#s-one-gc-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#s-one-gc-send {
    margin-left: 10px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.s-one-msg {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    max-width: 85%;
    line-height: 1.4;
    font-size: 14px;
}

.s-one-msg.user {
    background: #e1f5fe;
    margin-left: auto;
    color: #0277bd;
    border-bottom-right-radius: 0;
}

.s-one-msg.ai {
    background: #fff;
    border: 1px solid #eee;
    margin-right: auto;
    color: #333;
    border-bottom-left-radius: 0;
}

.s-one-msg.error {
    color: red;
    font-size: 12px;
    text-align: center;
}

.s-one-msg.loading {
    color: #999;
    font-style: italic;
    font-size: 12px;
}