/* ==========================================================================
   Captain Copilot - Chat with Your Resume & Targeted Revisions Styles
   Resume Captain Motif: Coral (#ee5f49 / #ed4e34), Charcoal Slate (#1e293b)
   ========================================================================== */

/* Topline Trigger Button (Matches quick-copy icon: clean subtle grey, hover red & float) */
#rc-copilot-header-trigger,
.rc-copilot-pill-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px 8px !important;
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 5px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    text-decoration: none;
    line-height: 1 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

#rc-copilot-header-trigger:hover,
.rc-copilot-pill-btn:hover {
    background: #fff8f7 !important;
    color: #ee5f49 !important;
    border-color: #fca5a5 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(238, 95, 73, 0.1) !important;
}

#rc-copilot-header-trigger:hover i,
.rc-copilot-pill-btn:hover i {
    filter: drop-shadow(0 2px 3px rgba(237, 78, 52, 0.25));
}

#rc-copilot-header-trigger i,
.rc-copilot-pill-btn i {
    font-size: 11.5px !important;
    color: inherit;
    transition: transform 0.2s ease;
}

/* Copilot Drawer Wrapper (In Left Column) */
.rc-copilot-drawer {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex-shrink: 0;
    margin-top: 2px;
    margin-bottom: 6px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
}

/* Remove default focus outline/dotted border on tabs */
.rc-tabs-nav .rc-tab,
.rc-tabs-nav .rc-tab:focus,
.rc-tabs-nav .rc-tab:active,
.rc-tabs-nav .rc-tab:focus-visible,
.rc-tabs-nav .rc-tab.active,
.rc-tabs-nav .rc-tab.active:focus,
.rc-tabs-nav .rc-tab.active:focus-visible {
    outline: none !important;
    outline-style: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.rc-tabs-nav .rc-tab::-moz-focus-inner {
    border: 0 !important;
    outline: none !important;
}

/* Hover style matching other accordions (.feedback-header:hover) */
.rc-copilot-drawer:hover {
    border-color: #fca5a5 !important;
    box-shadow: 0 2px 6px rgba(238, 95, 73, 0.08) !important;
}

.rc-copilot-drawer.open {
    border-color: #fca5a5 !important;
    box-shadow: 0 3px 12px rgba(238, 95, 73, 0.08) !important;
}

.rc-copilot-drawer.open:hover {
    box-shadow: 0 4px 14px rgba(238, 95, 73, 0.12) !important;
}

/* Header Bar */
.rc-copilot-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background-color: #fafafa;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
    width: 100%;
}

/* Match other accordion headers on hover: warm coral tint #fff8f7 */
.rc-copilot-bar:hover,
.rc-copilot-drawer:hover .rc-copilot-bar {
    background-color: #fff8f7 !important;
}

.rc-copilot-drawer.open .rc-copilot-bar {
    background-color: #fff8f7 !important;
    border-bottom-color: #fce7e7;
}

.rc-copilot-drawer.open .rc-copilot-bar:hover,
.rc-copilot-drawer.open:hover .rc-copilot-bar {
    background-color: #fff1ef !important;
}

.rc-copilot-bar-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.rc-copilot-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #ee5f49;
    color: #fff;
    border-radius: 50%;
    font-size: 10.5px;
    flex-shrink: 0;
}

.rc-copilot-title {
    font-weight: 700;
    font-size: 12.5px;
    color: #1f2937;
    white-space: nowrap;
}

.rc-copilot-hint {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 4px;
}

@media (max-width: 768px) {
    .rc-copilot-hint {
        display: none;
    }
}

/* Header Bar Right Controls */
.rc-copilot-bar-right {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

.rc-copilot-bar .rc-copilot-expand-btn,
#rc-copilot-expand-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    color: #9ca3af !important;
    cursor: pointer !important;
    font-size: 11px !important;
    line-height: 1 !important;
    transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease !important;
    flex-shrink: 0 !important;
    outline: none !important;
}

.rc-copilot-bar .rc-copilot-expand-btn:hover,
#rc-copilot-expand-toggle:hover {
    color: #ee5f49 !important;
    background: rgba(238, 95, 73, 0.12) !important;
    background-color: rgba(238, 95, 73, 0.12) !important;
    transform: scale(1.08) !important;
}

.rc-copilot-bar .rc-copilot-expand-btn i,
#rc-copilot-expand-toggle i {
    font-size: 11px !important;
    color: inherit !important;
    line-height: 1 !important;
    display: inline-block !important;
}

.rc-copilot-bar:hover .rc-copilot-expand-btn i,
.rc-copilot-drawer.open .rc-copilot-expand-btn i {
    color: #9ca3af;
}

.rc-copilot-drawer.expanded-height #rc-copilot-expand-toggle {
    color: #ee5f49 !important;
}

.rc-copilot-drawer.expanded-height #rc-copilot-expand-toggle i {
    color: #ee5f49 !important;
}

.rc-copilot-drawer.expanded-height .rc-copilot-content {
    max-height: 90vh !important;
}

/* Toggle chevron indicator (matches feedback-header toggle-indicator) */
.rc-copilot-bar .toggle-indicator {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    margin-left: 0 !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

.rc-copilot-bar .toggle-indicator i {
    font-size: 11px !important;
    color: #9ca3af !important;
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.2s ease !important;
    display: inline-block !important;
    line-height: 1 !important;
}

.rc-copilot-bar:hover .toggle-indicator i,
.rc-copilot-drawer.open .toggle-indicator i {
    color: #ee5f49 !important;
}

.rc-copilot-drawer.open .toggle-indicator i {
    transform: rotate(180deg) !important;
}

/* Copilot Content Container */
.rc-copilot-content {
    display: flex;
    flex-direction: column;
    height: 0;
    max-height: 85vh;
    background: #ffffff;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: height 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.32s;
}

.rc-copilot-drawer.open .rc-copilot-content {
    visibility: visible;
    opacity: 1;
    transition: height 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

.rc-copilot-content.is-resizing {
    transition: none !important;
}

/* Drag-to-Resize Handle at Bottom of Drawer */
.rc-copilot-resizer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 13px;
    background: #fafafa;
    border-top: 1px solid #f1f5f9;
    cursor: ns-resize;
    user-select: none;
    transition: background 0.15s ease;
    flex-shrink: 0;
    width: 100%;
}

.rc-copilot-resizer:hover,
.rc-copilot-resizer.is-dragging {
    background: #fff1ef;
}

.rc-resizer-line {
    width: 38px;
    height: 3.5px;
    background: #cbd5e1;
    border-radius: 4px;
    transition: background 0.15s ease, width 0.15s ease;
    pointer-events: none;
}

.rc-copilot-resizer:hover .rc-resizer-line,
.rc-copilot-resizer.is-dragging .rc-resizer-line {
    background: #ee5f49;
    width: 52px;
}

/* Quick Action Pills */
.rc-copilot-quick-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    flex-shrink: 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.rc-copilot-quick-pills::-webkit-scrollbar {
    height: 4px;
}
.rc-copilot-quick-pills::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 2px;
}

.rc-pills-label {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 2px;
    flex-shrink: 0;
}

.rc-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 11.5px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.2;
    flex-shrink: 0;
}

.rc-pill:hover {
    background: #fff1ef;
    border-color: #fca5a5;
    color: #ed4e34;
    transform: translateY(-1px);
}

/* Selection Focus Banner (RC motif: warm coral/red) */
#rc-copilot-selection-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background: #fff8f7;
    border-bottom: 1px solid transparent;
    font-size: 11.5px;
    color: #b91c1c;
    flex-shrink: 0;
    box-sizing: border-box !important;
    transition: max-height 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), padding 0.25s ease, opacity 0.2s ease, border-bottom-color 0.2s ease;
}

#rc-copilot-selection-banner.active {
    max-height: 38px;
    padding: 6px 12px;
    opacity: 1;
    border-bottom-color: #fecaca;
}

.rc-selection-info {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#rc-copilot-selected-preview {
    font-style: italic;
    font-weight: 600;
}

#rc-copilot-clear-selection {
    background: none;
    border: none;
    font-size: 16px;
    color: #ef4444;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

#rc-copilot-clear-selection:hover {
    color: #b91c1c;
}

/* Messages Stream */
.rc-copilot-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
}

.rc-chat-msg {
    display: flex;
    gap: 10px;
    max-width: 96%;
    width: 100%;
    box-sizing: border-box;
    animation: rc-fade-in 0.25s ease-out;
}

@keyframes rc-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.rc-chat-assistant {
    align-self: flex-start;
    flex-wrap: wrap;
}

.rc-chat-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.rc-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.rc-chat-assistant .rc-msg-avatar {
    background: #fff1ef;
    color: #ee5f49;
    border: 1px solid #fecaca;
}

/* User avatar in RC Motif: Charcoal Slate */
.rc-chat-user .rc-msg-avatar {
    background: #1e293b;
    color: #ffffff;
}

.rc-msg-bubble {
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
    position: relative;
    word-break: break-word;
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.rc-chat-assistant .rc-msg-bubble {
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 3px;
}

/* User bubble in RC Motif: Dark Charcoal Slate with white text */
.rc-chat-user .rc-msg-bubble {
    background: #1e293b;
    color: #ffffff;
    border-top-right-radius: 3px;
}

.rc-msg-bubble p {
    margin: 0 0 6px 0;
    line-height: 1.5;
}

.rc-msg-bubble p:last-child {
    margin-bottom: 0;
}

/* Bulleted and Numbered Lists Inside Copilot Messages */
.rc-msg-bubble ul,
.rc-revision-body ul {
    margin: 6px 0 8px 0 !important;
    padding: 0 0 0 22px !important;
    list-style-type: disc !important;
    list-style-position: outside !important;
}

.rc-msg-bubble ol,
.rc-revision-body ol {
    margin: 6px 0 8px 0 !important;
    padding: 0 0 0 22px !important;
    list-style-type: decimal !important;
    list-style-position: outside !important;
}

.rc-msg-bubble li,
.rc-revision-body li {
    margin-bottom: 5px !important;
    line-height: 1.5 !important;
    color: inherit !important;
}

.rc-msg-bubble li:last-child,
.rc-revision-body li:last-child {
    margin-bottom: 0 !important;
}

/* Tip / Notice bubble */
.rc-selection-tip-msg .rc-msg-bubble {
    background: #fff8f7 !important;
    border: 1px solid #fecaca !important;
    border-left: 3.5px solid #ee5f49 !important;
    color: #1e293b !important;
}

.rc-tip-hint {
    margin-top: 6px;
    font-size: 11.5px;
    color: #ee5f49;
    font-weight: 500;
}

.rc-msg-tip {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 6px !important;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}

/* Suggested Revision Card */
.rc-revision-card {
    margin-top: 10px;
    background: #ffffff;
    border: 1.5px solid #10b981;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex-basis: 100%;
}

.rc-revision-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #ecfdf5;
    border-bottom: 1px solid #d1fae5;
    font-size: 11.5px;
    font-weight: 700;
    color: #065f46;
}

.rc-revision-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rc-copy-revision-btn,
.rc-apply-revision-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid;
    line-height: 1.2;
}

.rc-copy-revision-btn {
    background: #ffffff;
    border-color: #a7f3d0;
    color: #065f46;
}

.rc-copy-revision-btn:hover {
    background: #d1fae5;
}

.rc-apply-revision-btn {
    background: #ee5f49;
    border-color: #ee5f49;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(238, 95, 73, 0.2);
}

.rc-apply-revision-btn:hover {
    background: #dc351e;
    transform: translateY(-1px);
}

.rc-revision-body {
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.5;
    background: #fbfdfc;
    color: #1e293b;
    max-height: 250px;
    overflow-y: auto;
}

.rc-revision-body p {
    margin: 0 0 6px 0;
    line-height: 1.5;
}

.rc-revision-body p:last-child {
    margin-bottom: 0;
}

/* Template formatting inside suggested revision preview */
.rc-revision-body header h1 {
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 0 0 3px 0 !important;
    color: #111827 !important;
    text-transform: none !important;
    line-height: 1.2 !important;
}

.rc-revision-body .contact-info {
    font-size: 11px !important;
    color: #64748b !important;
    margin-bottom: 8px !important;
}

.rc-revision-body .section-heading {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #111827 !important;
    border-bottom: 1px solid #111827 !important;
    margin: 10px 0 5px 0 !important;
    padding-bottom: 2px !important;
    letter-spacing: 0.5px;
}

.rc-revision-body .job-header,
.rc-revision-body .university-header {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-top: 5px !important;
}

.rc-revision-body .job-subheader {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 11.5px !important;
    color: #4b5563 !important;
    font-style: italic !important;
    margin-bottom: 3px !important;
}

.rc-revision-body .company,
.rc-revision-body .university {
    font-weight: 700 !important;
    font-style: normal !important;
}

.rc-revision-body .dates,
.rc-revision-body .location {
    text-align: right !important;
    font-weight: 500 !important;
    font-style: normal !important;
}

.rc-revision-body .summary {
    font-size: 12px !important;
    line-height: 1.45 !important;
    color: #334155 !important;
    margin-bottom: 6px !important;
}

/* Copilot Footer & Textarea */
.rc-copilot-footer {
    padding: 8px 12px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.rc-copilot-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rc-copilot-input-wrap:focus-within {
    border-color: #ee5f49;
    box-shadow: 0 0 0 3px rgba(238, 95, 73, 0.12);
}

#rc-copilot-input {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.35;
    padding: 4px 2px;
    background: transparent;
    color: #1e293b;
    max-height: 80px;
    min-height: 24px;
}

#rc-copilot-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #ee5f49;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
}

#rc-copilot-send-btn:hover {
    background: #dc351e;
}

#rc-copilot-send-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.rc-copilot-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 11px;
    color: #94a3b8;
}

#rc-copilot-clear-chat {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#rc-copilot-clear-chat:hover {
    color: #ef4444;
}

/* Flash green animation on editor when revision is applied */
.rc-editor-flash-updated {
    animation: rc-green-flash 1.5s ease-out;
}

@keyframes rc-green-flash {
    0% { background-color: #d1fae5; }
    100% { background-color: transparent; }
}

/* Pulsing glowing border animation on editor when user needs to highlight target */
.rc-editor-highlight-needed {
    border-radius: 4px;
    outline: 2.5px solid #ee5f49 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(238, 95, 73, 0.2), 0 0 16px rgba(238, 95, 73, 0.3) !important;
    animation: rc-editor-pulse 1.8s infinite ease-in-out !important;
    transition: all 0.25s ease !important;
}

@keyframes rc-editor-pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(238, 95, 73, 0.2), 0 0 12px rgba(238, 95, 73, 0.25);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(238, 95, 73, 0.35), 0 0 18px rgba(238, 95, 73, 0.45);
    }
}

/* Limit Reached Callout in Chat */
.rc-limit-msg .rc-limit-bubble {
    border: 1.5px solid #fed7d2;
    background: #fffaf9;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(238, 95, 73, 0.08);
}

.rc-limit-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
}

.rc-limit-desc {
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.rc-limit-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.rc-limit-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ee5f49;
    color: #ffffff !important;
    padding: 7px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12.5px;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(238, 95, 73, 0.25);
    transition: all 0.2s ease;
}

.rc-limit-upgrade-btn:hover {
    background: #d43d26;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(238, 95, 73, 0.35);
    color: #ffffff !important;
}

/* ==========================================================================
   COPILOT FULL LEFT-PANEL EXPANDED MODE (DESKTOP)
   Locks left panel height to match right editor (calc(100vh - 20px)),
   hides feedback & guidance below, and expands chat component to fill 100%.
   ========================================================================== */
@media (min-width: 769px) {
    #rc-output-panel.rc-copilot-expanded-view {
        position: sticky !important;
        top: 10px !important;
        height: calc(100vh - 20px) !important;
        max-height: calc(100vh - 20px) !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: 12px !important;
        box-sizing: border-box !important;
    }

    #rc-output-panel.rc-copilot-expanded-view .rc-tabs-nav {
        flex-shrink: 0 !important;
        margin-bottom: 8px !important;
    }

    #rc-output-panel.rc-copilot-expanded-view #rc-tab-panel-resume.active {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    #rc-output-panel.rc-copilot-expanded-view #rc-tab-panel-application.active,
    #rc-output-panel.rc-copilot-expanded-view #rc-tab-panel-interview.active {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        display: block !important;
    }

    /* Hide section divider labels and all feedback / changes containers below Copilot */
    #rc-output-panel.rc-copilot-expanded-view #rc-tab-panel-resume > span,
    #rc-output-panel.rc-copilot-expanded-view .rc-copilot-section-label,
    #rc-output-panel.rc-copilot-expanded-view #rc-output,
    #rc-output-panel.rc-copilot-expanded-view #rc-changes-summary-container,
    #rc-output-panel.rc-copilot-expanded-view .rc-copilot-resizer {
        display: none !important;
    }

    /* Copilot drawer fills 100% of the tab panel */
    #rc-output-panel.rc-copilot-expanded-view #rc-copilot-drawer {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
        border-color: #fca5a5 !important;
        box-shadow: 0 4px 14px rgba(238, 95, 73, 0.1) !important;
        overflow: hidden !important;
    }

    /* Drawer header bar stays pinned */
    #rc-output-panel.rc-copilot-expanded-view .rc-copilot-bar {
        flex-shrink: 0 !important;
        background-color: #fff8f7 !important;
        border-bottom-color: #fce7e7 !important;
        padding: 8px 12px !important;
    }

    /* Expand toggle button highlights active when expanded */
    #rc-output-panel.rc-copilot-expanded-view #rc-copilot-expand-toggle {
        color: #ee5f49 !important;
        background: rgba(238, 95, 73, 0.14) !important;
        border-radius: 4px !important;
    }

    #rc-output-panel.rc-copilot-expanded-view #rc-copilot-expand-toggle i {
        color: #ee5f49 !important;
    }

    /* Copilot content fills remaining vertical space */
    #rc-output-panel.rc-copilot-expanded-view .rc-copilot-content {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: none !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        opacity: 1 !important;
        visibility: visible !important;
        transition: none !important;
    }

    /* Quick pills stay pinned at top */
    #rc-output-panel.rc-copilot-expanded-view .rc-copilot-quick-pills {
        flex-shrink: 0 !important;
    }

    /* Selection banner stays pinned */
    #rc-output-panel.rc-copilot-expanded-view #rc-copilot-selection-banner {
        flex-shrink: 0 !important;
    }

    /* Chat messages scroll internally with plenty of space */
    #rc-output-panel.rc-copilot-expanded-view #rc-copilot-chat-messages {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: none !important;
        overflow-y: auto !important;
    }

    /* Footer pinned to bottom */
    #rc-output-panel.rc-copilot-expanded-view .rc-copilot-footer {
        flex-shrink: 0 !important;
        background: #ffffff !important;
        border-top: 1px solid #f1f5f9 !important;
    }
}

/* ==========================================================================
   MOBILE (< 768px) COPILOT OPTIMIZATION (OPTION A)
   Hide the heavy accordion drawer and editor header trigger on mobile screens.
   Display a clean, subtle informational notice explaining desktop optimization.
   ========================================================================== */
@media (max-width: 768px) {
    /* Hide the Copilot drawer on mobile */
    #rc-copilot-drawer {
        display: none !important;
    }

    /* Hide the section label/hr in Tab 1 */
    .rc-copilot-section-label {
        display: none !important;
    }

    /* Hide the header trigger pill button in the resume editor topline */
    #rc-copilot-header-trigger,
    .rc-copilot-pill-btn {
        display: none !important;
    }

    /* Subtle informative notice for mobile users */
    .rc-copilot-mobile-notice {
        display: flex !important;
        align-items: center;
        background: #fff8f7;
        border: 1px dashed #fca5a5;
        border-radius: 6px;
        padding: 9px 12px;
        margin: 6px 0 14px 0;
        font-size: 12px;
        color: #4b5563;
        line-height: 1.45;
        box-shadow: 0 1px 2px rgba(238, 95, 73, 0.04);
        box-sizing: border-box;
    }

    .rc-copilot-mobile-notice-content {
        display: flex;
        align-items: center;
        gap: 9px;
    }

    .rc-copilot-mobile-notice-content i {
        color: #ee5f49;
        font-size: 14px;
        flex-shrink: 0;
    }

    .rc-copilot-mobile-notice-content strong {
        color: #1f2937;
        font-weight: 600;
    }
}

/* Ensure notice is never visible on desktop */
@media (min-width: 769px) {
    .rc-copilot-mobile-notice {
        display: none !important;
    }
}

/* ==========================================================================
   ENHANCED COPILOT INTERACTION STYLES
   - Before/After Diff Comparison
   - One-Click Safe Undo Button
   - Follow-up Prompt Chips
   - Minimalist Light Floating "Ask Copilot" Micro-Tooltip
   - Dynamic Smart Pills & Free Counter
   ========================================================================== */

/* Subtle Free Counter in Header Bar */
.rc-copilot-counter-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 2px 7px !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin-right: 4px !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}
.rc-copilot-counter-pill i {
    font-size: 9px !important;
    color: #f59e0b !important;
}
.rc-copilot-counter-pill:hover {
    background: #fff1ef !important;
    color: #ee5f49 !important;
    border-color: #fca5a5 !important;
}

/* Smart Pill (Job-Tailored) */
.rc-pill.rc-smart-pill {
    background: #fff8f7 !important;
    border-color: #fca5a5 !important;
    color: #c2410c !important;
    font-weight: 600 !important;
}
.rc-pill.rc-smart-pill:hover {
    background: #fee2e2 !important;
    border-color: #ee5f49 !important;
    color: #991b1b !important;
}

/* Revision Card Layout */
.rc-revision-card {
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #10b981;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.1);
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.rc-revision-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 6px 10px !important;
    background: #f0fdf4 !important;
    border-bottom: 1px solid #dcfce7 !important;
    min-height: 36px !important;
    box-sizing: border-box !important;
    gap: 8px !important;
}

.rc-revision-header > span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #065f46 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.rc-revision-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
}

/* UNIFIED BUTTON BASE FOR ALL CARD ACTIONS (High Specificity to override theme buttons) */
body #rc-copilot-drawer .rc-revision-actions button,
body .rc-copilot-content .rc-revision-actions button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    height: 24px !important;
    max-height: 24px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    line-height: 22px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
}

/* Diff Button */
body #rc-copilot-drawer .rc-revision-actions .rc-diff-revision-btn,
body .rc-copilot-content .rc-revision-actions .rc-diff-revision-btn {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}
body #rc-copilot-drawer .rc-revision-actions .rc-diff-revision-btn:hover,
body .rc-copilot-content .rc-revision-actions .rc-diff-revision-btn:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}
body #rc-copilot-drawer .rc-revision-actions .rc-diff-revision-btn.active,
body .rc-copilot-content .rc-revision-actions .rc-diff-revision-btn.active {
    background: #fff1ef !important;
    border-color: #fca5a5 !important;
    color: #ee5f49 !important;
}

/* Copy Button (Clean secondary action) */
body #rc-copilot-drawer .rc-revision-actions .rc-copy-revision-btn,
body .rc-copilot-content .rc-revision-actions .rc-copy-revision-btn {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}
body #rc-copilot-drawer .rc-revision-actions .rc-copy-revision-btn:hover,
body .rc-copilot-content .rc-revision-actions .rc-copy-revision-btn:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* Apply to Editor (Primary CTA) */
body #rc-copilot-drawer .rc-revision-actions .rc-apply-revision-btn,
body .rc-copilot-content .rc-revision-actions .rc-apply-revision-btn {
    background: #ee5f49 !important;
    border: 1px solid #ee5f49 !important;
    color: #ffffff !important;
}
body #rc-copilot-drawer .rc-revision-actions .rc-apply-revision-btn:hover,
body .rc-copilot-content .rc-revision-actions .rc-apply-revision-btn:hover {
    background: #dc351e !important;
    border-color: #dc351e !important;
    color: #ffffff !important;
}
body #rc-copilot-drawer .rc-revision-actions .rc-apply-revision-btn.is-applied,
body .rc-copilot-content .rc-revision-actions .rc-apply-revision-btn.is-applied {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

/* Undo Button */
body #rc-copilot-drawer .rc-revision-actions .rc-undo-revision-btn,
body .rc-copilot-content .rc-revision-actions .rc-undo-revision-btn {
    background: #ffffff !important;
    border: 1px solid #fca5a5 !important;
    color: #dc2626 !important;
}
body #rc-copilot-drawer .rc-revision-actions .rc-undo-revision-btn:hover,
body .rc-copilot-content .rc-revision-actions .rc-undo-revision-btn:hover {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}

/* Before / After Diff Comparison View */
.rc-revision-diff {
    background: #f8fafc;
    border-radius: 5px;
    padding: 10px;
    font-size: 13px;
    line-height: 1.6;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    margin-top: 6px;
    max-height: 300px;
    overflow-y: auto;
}

/* In-Editor "Flash to Spot" Animation */
@keyframes rcSpotFlash {
    0% {
        background-color: rgba(34, 197, 94, 0.45);
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
        border-radius: 4px;
    }
    50% {
        background-color: rgba(34, 197, 94, 0.22);
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
    }
    100% {
        background-color: transparent;
        box-shadow: none;
    }
}

.rc-just-applied-flash {
    animation: rcSpotFlash 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
    border-radius: 4px !important;
    transition: background-color 0.3s ease !important;
}
.rc-diff-del {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    text-decoration: line-through !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
    margin: 0 1px !important;
}
.rc-diff-ins {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
    margin: 0 1px !important;
}
.rc-diff-fallback {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rc-diff-block {
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12.5px;
}
.rc-diff-before {
    background: #fff1f2;
}
.rc-diff-after {
    background: #f0fdf4;
}

/* Follow-up Suggestion Chips */
body #rc-copilot-drawer .rc-followup-chips,
body .rc-copilot-content .rc-followup-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 8px !important;
    padding-top: 6px !important;
    border-top: 1px dashed #e2e8f0 !important;
}

body #rc-copilot-drawer .rc-followup-chips button.rc-followup-chip,
body .rc-copilot-content .rc-followup-chips button.rc-followup-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    height: 24px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    padding: 0 9px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    line-height: 22px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin: 0 !important;
    transition: all 0.15s ease !important;
}

body #rc-copilot-drawer .rc-followup-chips button.rc-followup-chip:hover,
body .rc-copilot-content .rc-followup-chips button.rc-followup-chip:hover {
    background: #fff8f7 !important;
    border-color: #fca5a5 !important;
    color: #ee5f49 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(238, 95, 73, 0.08) !important;
}

/* Floating "Ask Copilot" Micro-Tooltip in TinyMCE (Clean Light Theme) */
.rc-copilot-floating-toolbar {
    position: absolute;
    z-index: 99999;
    display: none !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px 5px !important;
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    pointer-events: auto !important;
}

.rc-copilot-floating-toolbar.active {
    display: flex !important;
    animation: rcFloatingFadeIn 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

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

.rc-floating-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding-left: 5px !important;
    padding-right: 2px !important;
}
.rc-floating-badge i {
    color: #ee5f49 !important;
}

body .rc-copilot-floating-toolbar .rc-floating-action {
    display: inline-flex !important;
    align-items: center !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    padding: 3px 8px !important;
    border-radius: 12px !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease !important;
}

body .rc-copilot-floating-toolbar .rc-floating-action .rc-floating-icon {
    display: inline-block !important;
    margin-right: 5px !important;
    font-size: 11px !important;
    line-height: 1 !important;
}

body .rc-copilot-floating-toolbar .rc-floating-action:hover {
    background: #fff1ef !important;
    border-color: #fca5a5 !important;
    color: #ee5f49 !important;
    transform: translateY(-1px) !important;
}

body .rc-copilot-floating-toolbar .rc-floating-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    font-size: 15px !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 2px !important;
    box-shadow: none !important;
    outline: none !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

body .rc-copilot-floating-toolbar .rc-floating-close:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

@media (max-width: 768px) {
    .rc-copilot-floating-toolbar {
        display: none !important;
    }
}
