/* ZibChat Mini CSS */
.zc-mini-chat {
    display: flex;
    flex-direction: column;
    height: 400px;
    max-height: 80vh;
    position: relative;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.zc-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f6f8fa;
    border-bottom: 1px solid #e1e4e8;
    font-weight: bold;
    color: #24292e;
}

.zc-mini-header-actions {
    display: flex;
    gap: 10px;
}

.zc-mini-action {
    background: none;
    border: none;
    color: #586069;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
}

.zc-mini-action:hover {
    color: #24292e;
}

.zc-mini-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
}

.zc-mini-loading {
    text-align: center;
    color: #586069;
    padding: 20px;
}

.zc-mini-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e1e4e8;
    background: #fafbfc;
    align-items: flex-end;
}

.zc-mini-emoji {
    background: none;
    border: none;
    color: #586069;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    margin-right: 2px;
    transition: color 0.2s;
}

.zc-mini-emoji:hover {
    color: #0366d6;
}

.zc-mini-upload {
    background: none;
    border: none;
    color: #586069;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    margin-right: 5px;
    transition: color 0.2s;
}

.zc-mini-upload:hover {
    color: #0366d6;
}

.zc-mini-input {
    flex: 1;
    border: 1px solid #e1e4e8;
    border-radius: 20px;
    padding: 8px 12px;
    resize: none;
    max-height: 80px;
    outline: none;
    font-size: 14px;
    line-height: 1.4;
}

.zc-mini-send {
    background: #0366d6;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.zc-mini-send:hover {
    background: #005cc5;
}

.zc-mini-msg {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease-out;
    align-items: flex-start;
}

.zc-mini-msg-avatar-link {
    display: flex;
    flex: 0 0 auto;
    text-decoration: none;
}

.zc-mini-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.zc-mini-msg-body {
    flex: 1;
    min-width: 0;
}

.zc-mini-msg-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 2px;
}

.zc-mini-msg-author {
    font-weight: 600;
    color: #24292e;
    font-size: 13px;
    text-decoration: none;
}

.zc-mini-msg-time {
    font-size: 11px;
    color: #6a737d;
}

.zc-mini-msg-content {
    font-size: 14px;
    color: #24292e;
    word-break: break-word;
    line-height: 1.5;
}

.zc-mini-msg--mine {
    flex-direction: row-reverse;
}

.zc-mini-msg--mine .zc-mini-msg-body {
    text-align: right;
}

.zc-mini-msg--mine .zc-mini-msg-header {
    justify-content: flex-end;
}

.zc-mini-msg--mine .zc-mini-msg-content {
    display: inline-block;
    background: #e8f0ff;
    border: 1px solid #d7e3ff;
    padding: 6px 10px;
    border-radius: 10px;
}

.zc-mini-msg--other .zc-mini-msg-content {
    display: inline-block;
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    padding: 6px 10px;
    border-radius: 10px;
}

.zc-mini-emoji-picker {
    position: absolute;
    left: 10px;
    bottom: 62px;
    width: 260px;
    max-height: 220px;
    overflow: auto;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    padding: 10px;
    z-index: 10001;
}

.zc-mini-emoji-picker__grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}

.zc-mini-emoji-picker__item {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}

.zc-mini-emoji-picker__item:hover {
    background: #f6f8fa;
}

.zc-mini-emoji-picker__item img {
    width: 24px;
    height: 24px;
    display: block;
}

/* Floating Widget Styles */
.zc-floating-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.zc-floating-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0366d6;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, background 0.2s;
}

.zc-floating-toggle:hover {
    transform: scale(1.05);
    background: #005cc5;
}

.zc-floating-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 320px;
}

.zc-mini-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
}

.zc-mini-login-icon {
    font-size: 40px;
    color: #959da5;
    margin-bottom: 15px;
}

.zc-btn-primary {
    display: inline-block;
    padding: 8px 16px;
    background: #0366d6;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.2s;
}

.zc-btn-primary:hover {
    background: #005cc5;
    color: #fff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .zc-floating-panel {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 60vh;
    }
    .zc-floating-panel .zc-mini-chat {
        height: 100%;
        border-radius: 12px 12px 0 0;
        border: none;
        border-top: 1px solid #e1e4e8;
    }
}
