/* Communication Center Styles - Exact Match */
.cc-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 95vw;
    min-width: 1200px;
    width: 100%;
    height: 80vh;
    min-height: 700px;
    margin: 10px auto;
    display: flex;
    flex-direction: column;
}

/* Header Styles - Exact Match */
.cc-header {
    background: #ffffff;
    padding: 24px 40px 20px 40px;
    border-bottom: 1px solid #f1f3f4;
    text-align: center;
    flex-shrink: 0;
}

.cc-title {
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.cc-subtitle {
    color: #5f6368;
    font-size: 13px;
    margin: 0;
    font-weight: 400;
}

/* Navigation Tabs - Exact Match */
.cc-nav-tabs {
    background: #ffffff;
    border-bottom: 1px solid #e8eaed;
    padding: 0 60px;
    display: flex;
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
}

.cc-tab-btn {
    background: none;
    border: none;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.cc-tab-btn:hover {
    color: #1a73e8;
}

.cc-tab-btn.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.cc-tab-btn.active::before {
    content: '💬';
    margin-right: 4px;
}

.cc-tab-btn[data-tab="settings"].active::before {
    content: '⚙️';
}

/* Main Content */
.cc-main-content {
    flex: 1;
    background: #ffffff;
    overflow: hidden;
    min-height: 0;
}

.cc-tab-content {
    display: none;
    height: 100%;
}

.cc-tab-content.active {
    display: block;
}

/* Messages Layout - Exact Match */
.cc-messages-layout {
    display: flex;
    height: 100%;
}

/* Left Sidebar - Exact Match */
.cc-sidebar {
    width: 380px;
    min-width: 380px;
    border-right: 1px solid #e8eaed;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.cc-sidebar-header {
    padding: 20px 20px 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f3f4;
    flex-shrink: 0;
}

.cc-sidebar-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.cc-compose-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.cc-compose-btn:hover {
    background: #1557b0;
}

.cc-compose-btn::before {
    content: '✏️';
    font-size: 12px;
}

/* Search Box - Exact Match */
.cc-search-box {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f4;
    flex-shrink: 0;
}

.cc-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 16px;
    box-sizing: border-box;
}

.cc-search-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.cc-search-input::placeholder {
    color: #9aa0a6;
}

/* Filter Box - Exact Match */
.cc-filter-box {
    padding: 0 20px 16px 20px;
    border-bottom: 1px solid #f1f3f4;
    flex-shrink: 0;
}

.cc-filter-select {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
    cursor: pointer;
    color: #3c4043;
    box-sizing: border-box;
}

/* Messages List - Exact Match */
.cc-messages-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.cc-message-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.cc-message-item:hover {
    background: #f8f9fa;
}

.cc-message-item.active {
    background: #e8f0fe;
    border-left: 3px solid #1a73e8;
}

.cc-message-item.unread {
    background: #fff8e1 !important;
    border-left: 3px solid #f9ab00;
}

.cc-message-item.starred {
    background: #fffbf0;
    border-left: 3px solid #f9ab00;
}

/* Unread takes priority over starred */
.cc-message-item.unread.starred {
    background: #fff8e1 !important;
    border-left: 3px solid #f9ab00;
}

.cc-star-icon {
    margin-left: 4px;
    font-size: 12px;
    color: #f9ab00;
}

.cc-unread-badge {
    background: #1a73e8;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.cc-message-item.starred .cc-message-subject {
    font-weight: 600;
}

.cc-message-sender-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cc-message-avatar {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.cc-message-sender-name {
    font-weight: 500;
    color: #202124;
    font-size: 14px;
    flex: 1;
}

.cc-message-priority {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: lowercase;
}

.cc-message-priority.urgent {
    background: #fce8e6;
    color: #d93025;
}

.cc-message-priority.high {
    background: #fef7e0;
    color: #f9ab00;
}

.cc-message-priority.normal {
    background: #e8f0fe;
    color: #1a73e8;
}

.cc-message-subject {
    font-weight: 400;
    color: #202124;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.cc-message-preview {
    color: #5f6368;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cc-message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #5f6368;
}

/* Content Area - Exact Match */
.cc-content-area {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    min-width: 0;
}

.cc-no-message-selected {
    text-align: center;
    color: #5f6368;
    max-width: 300px;
    padding: 40px 20px;
}

.cc-no-message-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.3;
    transform: rotate(-15deg);
}

.cc-no-message-selected h3 {
    font-size: 20px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 8px 0;
}

.cc-no-message-selected p {
    font-size: 14px;
    margin: 0;
    color: #5f6368;
}

/* Message Content Display */
.cc-message-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 30px 40px;
    overflow-y: auto;
}

/* Thread Display Styles */
.cc-message-thread {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
}

/* Message Display Container */
.cc-message-display {
    padding: 20px 30px;
    height: 100%;
    overflow-y: auto;
}

/* Avatar and Subject Line */
.cc-message-header-line {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.cc-message-avatar-circle {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #5f6368;
    flex-shrink: 0;
}

.cc-message-header-content {
    flex: 1;
    min-width: 0;
}

.cc-message-subject-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cc-message-subject-text {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.cc-message-from-line {
    font-size: 14px;
    color: #5f6368;
    margin: 0;
}

.cc-from-label {
    font-weight: 500;
    margin-right: 4px;
}

.cc-from-value {
    color: #202124;
}

.cc-priority-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    flex-shrink: 0;
}

.cc-priority-badge.urgent {
    background: #fce8e6;
    color: #d93025;
}

.cc-priority-badge.high {
    background: #fef7e0;
    color: #f9ab00;
}

.cc-priority-badge.normal {
    background: #e8f0fe;
    color: #1a73e8;
}

.cc-priority-badge.low {
    background: #e8f5e8;
    color: #137333;
}

.cc-message-menu {
    margin-left: auto;
    position: relative;
}

/* Message Meta Lines */
.cc-message-meta-lines {
    margin-bottom: 20px;
    padding-left: 52px; /* Align with content after avatar */
}

.cc-meta-line {
    margin-bottom: 4px;
    font-size: 14px;
    color: #5f6368;
}

.cc-meta-line:last-child {
    margin-bottom: 0;
}

.cc-meta-label {
    font-weight: 500;
    display: inline-block;
    min-width: 40px;
    margin-right: 4px;
}

.cc-meta-value {
    color: #202124;
}

/* Message Body */
.cc-message-body {
    padding-left: 52px; /* Align with content after avatar */
    margin-bottom: 24px;
}

.cc-message-text {
    font-size: 14px;
    line-height: 1.6;
    color: #202124;
    margin: 0;
    white-space: pre-wrap;
}

/* Action Buttons */
.cc-message-actions {
    padding-left: 52px; /* Align with content after avatar */
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.cc-action-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cc-action-btn:hover {
    background: #1557b0;
}

.cc-forward-btn {
    background: #f8f9fa;
    color: #5f6368;
    border: 1px solid #dadce0;
}

.cc-forward-btn:hover {
    background: #e8eaed;
}

/* Three Dots Menu */
.cc-menu-trigger {
    background: none;
    border: none;
    font-size: 20px;
    color: #5f6368;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.cc-menu-trigger:hover {
    background: #f8f9fa;
}

.cc-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.cc-menu-dropdown.show {
    display: block;
    animation: ccMenuFadeIn 0.2s ease-out;
}

@keyframes ccMenuFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-8px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.cc-menu-item {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    color: #5f6368;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s ease;
}

.cc-menu-item:hover {
    background: #f8f9fa;
    color: #202124;
}

.cc-menu-item-danger:hover {
    background: #fce8e6;
    color: #d93025;
}

.cc-menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Thread History Styles */
.cc-thread-history {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e8eaed;
}

.cc-thread-history h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #202124;
    font-weight: 500;
}

.cc-thread-message {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.cc-thread-header {
    background: #e8eaed;
    padding: 10px 15px;
    font-size: 13px;
    color: #5f6368;
    border-bottom: 1px solid #dadce0;
}

.cc-thread-body {
    padding: 15px;
    color: #3c4043;
    line-height: 1.6;
}

/* Keep existing priority badge styles for backward compatibility */
.cc-message-priority-badge.urgent {
    background: #fce8e6;
    color: #d93025;
}

.cc-message-priority-badge.high {
    background: #fef7e0;
    color: #f9ab00;
}

.cc-message-priority-badge.normal {
    background: #e8f0fe;
    color: #1a73e8;
}

.cc-message-priority-badge.low {
    background: #e8f5e8;
    color: #137333;
}

/* Bottom Action Buttons */
.cc-message-view-actions-bottom {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cc-reply-btn, .cc-forward-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Thread Messages */
.cc-thread-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
    background: #f8f9fa;
    min-height: 0;
}

.cc-thread-message {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.cc-thread-message:last-child {
    margin-bottom: 0;
}

.cc-thread-message-header {
    background: #f8f9fa;
    padding: 12px 20px;
    border-bottom: 1px solid #e8eaed;
    font-size: 13px;
    color: #5f6368;
}

.cc-thread-message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-thread-message-sender {
    font-weight: 500;
    color: #202124;
}

.cc-thread-message-date {
    color: #5f6368;
}

.cc-thread-message-recipients {
    margin-top: 4px;
    font-size: 12px;
}

.cc-thread-message-body {
    padding: 20px;
    line-height: 1.6;
    color: #3c4043;
    white-space: pre-wrap;
}

.cc-thread-message.is-reply {
    margin-left: 40px;
    border-left: 3px solid #1a73e8;
}

.cc-thread-message.is-reply .cc-thread-message-header {
    background: #e8f0fe;
}

/* Reply Form */
.cc-thread-reply {
    border-top: 1px solid #e8eaed;
    background: #ffffff;
    flex-shrink: 0;
}

.cc-reply-header {
    padding: 16px 30px 12px 30px;
    border-bottom: 1px solid #f1f3f4;
}

.cc-reply-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #202124;
}

.cc-reply-form {
    padding: 0 30px 20px 30px;
}

.cc-reply-message {
    margin-bottom: 16px;
}

.cc-reply-message textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.cc-reply-message textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.cc-reply-message textarea::placeholder {
    color: #9aa0a6;
}

.cc-reply-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cc-reply-actions .cc-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid;
}

.cc-reply-actions .cc-btn-primary {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.cc-reply-actions .cc-btn-primary:hover {
    background: #1557b0;
    border-color: #1557b0;
}

.cc-reply-actions .cc-btn-attach {
    background: #ffffff;
    color: #1a73e8;
    border-color: #1a73e8;
}

.cc-reply-actions .cc-btn-attach:hover {
    background: #e8f0fe;
}

/* Reply attached files */
#reply-attached-files {
    margin-top: 8px;
    font-size: 12px;
    color: #5f6368;
}

#reply-attached-files .cc-attached-file {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f3f4;
    padding: 4px 8px;
    border-radius: 12px;
    margin-right: 8px;
    margin-bottom: 4px;
}

#reply-attached-files .cc-remove-file {
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#reply-attached-files .cc-remove-file:hover {
    color: #d93025;
}

/* Responsive adjustments for thread view */
@media (max-width: 900px) {
    .cc-thread-header {
        padding: 16px 12px;
    }
    
    .cc-thread-subject {
        font-size: 18px;
    }
    
    .cc-thread-messages {
        padding: 16px 12px;
    }
    
    .cc-thread-message.is-reply {
        margin-left: 20px;
    }
    
    .cc-reply-header,
    .cc-reply-form {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .cc-reply-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cc-reply-actions .cc-btn {
        justify-content: center;
    }
}
/* Delete Confirmation Modal */
.cc-delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cc-delete-modal.show {
    opacity: 1;
    visibility: visible;
}

.cc-delete-content {
    background: white;
    border-radius: 8px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cc-delete-modal.show .cc-delete-content {
    transform: scale(1);
}

.cc-delete-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.cc-delete-icon {
    width: 48px;
    height: 48px;
    background: #fce8e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.cc-delete-title {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.cc-delete-message {
    color: #5f6368;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.cc-delete-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cc-delete-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
    min-width: 80px;
}

.cc-delete-btn-cancel {
    background: #ffffff;
    color: #5f6368;
    border-color: #dadce0;
}

.cc-delete-btn-cancel:hover {
    background: #f8f9fa;
}

.cc-delete-btn-confirm {
    background: #d93025;
    color: white;
    border-color: #d93025;
}

.cc-delete-btn-confirm:hover {
    background: #b52d20;
    border-color: #b52d20;
}

/* Compose Form Inline Styles */
.cc-compose-inline {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    padding: 30px 40px;
    overflow-y: auto;
}

.cc-compose-inline.active {
    display: flex;
}

.cc-compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eaed;
    flex-shrink: 0;
}

.cc-compose-header h3 {
    font-size: 20px;
    font-weight: 400;
    color: #202124;
    margin: 0;
}

.cc-compose-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #5f6368;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.cc-compose-close:hover {
    background: #f8f9fa;
}

.cc-compose-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cc-form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 18px;
}

.cc-form-group {
    flex: 1;
}

.cc-form-group.half {
    flex: 0.5;
}

.cc-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    margin-bottom: 6px;
}

.cc-form-group label.required::after {
    content: ' *';
    color: #d93025;
}

.cc-form-group input,
.cc-form-group select,
.cc-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.cc-form-group input:focus,
.cc-form-group select:focus,
.cc-form-group textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.cc-form-group textarea {
    resize: vertical;
    min-height: 140px;
    font-family: inherit;
    flex: 1;
}

.cc-form-group.message-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cc-form-group.message-group textarea {
    flex: 1;
    min-height: 180px;
}

.cc-error-message {
    color: #d93025;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.cc-error-message.show {
    display: block;
}

.cc-success-message {
    color: #137333;
    background: #e8f5e8;
    border: 1px solid #c6e6c6;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin: 16px 0;
    display: none;
}

.cc-success-message.show {
    display: block;
    animation: ccFadeIn 0.3s ease-out;
}

.cc-success-message::before {
    content: '✓ ';
    font-weight: bold;
    margin-right: 8px;
}

.cc-form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e8eaed;
    flex-shrink: 0;
}

.cc-btn {
    padding: 12px 24px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-btn-primary {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.cc-btn-primary:hover {
    background: #1557b0;
    border-color: #1557b0;
}

.cc-btn-secondary {
    background: #ffffff;
    color: #3c4043;
    border-color: #dadce0;
}

.cc-btn-secondary:hover {
    background: #f8f9fa;
}

.cc-btn-attach {
    background: #ffffff;
    color: #1a73e8;
    border-color: #1a73e8;
}

.cc-btn-attach:hover {
    background: #e8f0fe;
}

.cc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* File input styling */
.cc-file-input {
    display: none;
}

.cc-attached-files {
    margin-top: 8px;
    font-size: 12px;
    color: #5f6368;
}

.cc-attached-file {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f3f4;
    padding: 4px 8px;
    border-radius: 12px;
    margin-right: 8px;
    margin-bottom: 4px;
}

.cc-remove-file {
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-remove-file:hover {
    color: #d93025;
}

/* Settings Container - Exact Match */
.cc-settings-container {
    padding: 40px;
    height: 100%;
    overflow-y: auto;
    background: #ffffff;
}

.cc-settings-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8eaed;
}

.cc-settings-icon {
    width: 48px;
    height: 48px;
    background: #e8f0fe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.cc-settings-title h3 {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin: 0 0 4px 0;
}

.cc-settings-title p {
    font-size: 14px;
    color: #5f6368;
    margin: 0;
}

/* Settings Form */
.cc-settings-form {
    max-width: 800px;
}

.cc-settings-row {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.cc-settings-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cc-settings-group.full-width {
    flex: 1;
}

.cc-settings-label {
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    margin-bottom: 8px;
    display: block;
}

.cc-settings-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.cc-settings-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.cc-settings-input.cc-readonly {
    background: #f8f9fa;
    color: #5f6368;
    cursor: not-allowed;
}

.cc-settings-input.cc-readonly:focus {
    border-color: #dadce0;
    box-shadow: none;
}

.cc-settings-input::placeholder {
    color: #9aa0a6;
}

.cc-settings-error {
    color: #d93025;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.cc-settings-error.show {
    display: block;
}

/* Toggle Switches - Exact Match */
.cc-settings-toggles {
    margin: 32px 0;
    padding: 24px 0;
    border-top: 1px solid #e8eaed;
    border-bottom: 1px solid #e8eaed;
}

.cc-toggle-group {
    margin-bottom: 20px;
}

.cc-toggle-group:last-child {
    margin-bottom: 0;
}

.cc-toggle-label {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    font-size: 14px;
    color: #3c4043;
}

.cc-toggle-input {
    display: none;
}

.cc-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #dadce0;
    border-radius: 12px;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.cc-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cc-toggle-input:checked + .cc-toggle-slider {
    background: #072b58;
}

.cc-toggle-input:checked + .cc-toggle-slider::before {
    transform: translateX(20px);
}

.cc-toggle-text {
    font-weight: 400;
}

/* Settings Actions */
.cc-settings-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e8eaed;
}

.cc-settings-btn {
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-settings-btn-primary {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.cc-settings-btn-primary:hover {
    background: #1557b0;
    border-color: #1557b0;
}

.cc-settings-btn-secondary {
    background: #ffffff;
    color: #3c4043;
    border-color: #dadce0;
}

.cc-settings-btn-secondary:hover {
    background: #f8f9fa;
}

.cc-settings-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom Confirmation Modal */
.cc-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cc-confirmation-modal.show {
    opacity: 1;
    visibility: visible;
}

.cc-confirmation-content {
    background: white;
    border-radius: 8px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cc-confirmation-modal.show .cc-confirmation-content {
    transform: scale(1);
}

.cc-confirmation-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.cc-confirmation-icon {
    width: 48px;
    height: 48px;
    background: #fff3e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.cc-confirmation-title {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.cc-confirmation-message {
    color: #5f6368;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.cc-confirmation-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cc-confirmation-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
    min-width: 80px;
}

.cc-confirmation-btn-cancel {
    background: #ffffff;
    color: #5f6368;
    border-color: #dadce0;
}

.cc-confirmation-btn-cancel:hover {
    background: #f8f9fa;
}

.cc-confirmation-btn-confirm {
    background: #d93025;
    color: white;
    border-color: #d93025;
}

.cc-confirmation-btn-confirm:hover {
    background: #b52d20;
    border-color: #b52d20;
}

/* Responsive Settings */
@media (max-width: 768px) {
    .cc-settings-container {
        padding: 20px;
    }
    
    .cc-settings-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .cc-settings-actions {
        flex-direction: column;
    }
    
    .cc-settings-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Old settings content - remove */
.cc-settings-content {
    display: none;
}

.cc-settings-section {
    display: none;
}

.cc-setting-item {
    display: none;
    text-align: center;
}

.cc-settings-content h3 {
    font-size: 20px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 32px 0;
}

.cc-settings-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 400px;
    margin: 0 auto;
}

.cc-setting-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #3c4043;
    cursor: pointer;
    padding: 8px 0;
}

#cc-unread-count {
    background: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    margin-left: 5px;
    display: inline-block;
}


.cc-setting-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1a73e8;
}

/* Error message styling */
.cc-error {
    color: #d93025;
    background: #fce8e6;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

/* Loading State */
.cc-loading {
    padding: 40px;
    text-align: center;
    color: #5f6368;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .cc-container {
        max-width: 90vw;
        min-width: 1000px;
    }
    
    .cc-sidebar {
        width: 350px;
        min-width: 350px;
    }
    
    .cc-form-row {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 1200px) {
    .cc-container {
        max-width: 95vw;
        min-width: 800px;
        height: 75vh;
        min-height: 600px;
        margin: 5px auto;
        border-radius: 0;
    }
    
    .cc-header {
        padding: 16px 20px 12px 20px;
    }
    
    .cc-title {
        font-size: 22px;
    }
    
    .cc-nav-tabs {
        padding: 0 20px;
    }
    
    .cc-messages-layout {
        flex-direction: row;
    }
    
    .cc-sidebar {
        width: 300px;
        min-width: 300px;
    }
    
    .cc-form-row {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .cc-container {
        max-width: 100vw;
        min-width: 100vw;
        height: 100vh;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
        border: none;
    }
    
    .cc-header {
        padding: 16px 12px 12px 12px;
    }
    
    .cc-title {
        font-size: 20px;
    }
    
    .cc-subtitle {
        font-size: 12px;
    }
    
    .cc-nav-tabs {
        padding: 0 12px;
    }
    
    .cc-tab-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .cc-messages-layout {
        flex-direction: column;
    }
    
    .cc-sidebar {
        width: 100%;
        min-width: 100%;
        height: 50%;
        border-right: none;
        border-bottom: 1px solid #e8eaed;
    }
    
    .cc-content-area {
        height: 50%;
    }
    
    .cc-sidebar-header,
    .cc-search-box,
    .cc-filter-box {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .cc-message-item {
        padding: 10px 12px;
    }
    
    .cc-message-content {
        padding: 16px 12px;
    }
    
    .cc-compose-inline {
        padding: 16px 12px;
    }
    
    .cc-form-actions {
        flex-direction: column;
    }
    
    .cc-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animation */
.cc-fade-in {
    animation: ccFadeIn 0.3s ease-out;
}



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

/* Scrollbar Styling */
.cc-messages-list::-webkit-scrollbar,
.cc-message-body::-webkit-scrollbar {
    width: 6px;
}

.cc-messages-list::-webkit-scrollbar-track,
.cc-message-body::-webkit-scrollbar-track {
    background: #f1f3f4;
}

.cc-messages-list::-webkit-scrollbar-thumb,
.cc-message-body::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 3px;
}

.cc-messages-list::-webkit-scrollbar-thumb:hover,
.cc-message-body::-webkit-scrollbar-thumb:hover {
    background: #bdc1c6;
}
