/**
 * CodeIQ Modal Styles
 * Professional, centered modals with smooth animations
 */

/* Modal Container */
#codeiq-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    pointer-events: none;
}

/* Modal Overlay */
.codeiq-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    backdrop-filter: blur(0px);
    z-index: 100000;
}

.codeiq-modal-overlay.codeiq-modal-show {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 1;
    pointer-events: auto;
}

/* Modal Box */
.codeiq-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    height: fit-content;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    animation: codeiqSlideUp 0.3s ease-out forwards;
}

.codeiq-modal-show .codeiq-modal {
    transform: translateY(0);
    opacity: 1;
}

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

/* Modal Header */
.codeiq-modal-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: none;
    background: linear-gradient(135deg, #9a4054 0%, #c4576a 100%);
    gap: 12px;
}

/* CodeIQ Logo in Header - White filter for gradient background */
.codeiq-modal-logo {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.codeiq-modal-icon {
    font-size: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: white;
}

/* Hide empty icons */
.codeiq-modal-icon:empty {
    display: none;
}

.codeiq-modal-title {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white !important; /* Force white on gradient background */
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.codeiq-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.codeiq-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: scale(1.1);
}

/* Modal Body */
.codeiq-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 0 1 auto;
}

.codeiq-modal-message {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #6b6b6b;
    white-space: normal;
    word-wrap: break-word;
}

/* Compact variant for tighter spacing */
.codeiq-modal-compact .codeiq-modal-header {
    padding: 12px 16px;
}
.codeiq-modal-compact .codeiq-modal-title {
    font-size: 16px;
}
.codeiq-modal-compact .codeiq-modal-body {
    padding: 12px 16px;
}
.codeiq-modal-compact .codeiq-modal-message {
    font-size: 14px;
    line-height: 1.35;
}
.codeiq-modal-compact .codeiq-modal-footer {
    padding: 10px 16px;
}

.codeiq-modal-input {
    width: 100%;
    margin-top: 16px;
    padding: 10px 12px;
    font-size: 15px;
    border: 2px solid #d4d0c8;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
}

.codeiq-modal-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.codeiq-modal-input::placeholder {
    color: #999999;
}

/* Modal Footer */
.codeiq-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #d4d0c8;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #faf8f5;
}

/* Modal Buttons */
.codeiq-modal-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    outline: none;
    min-width: 80px;
}

.codeiq-modal-btn:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.codeiq-modal-btn-primary {
    background: linear-gradient(135deg, #9a4054 0%, #9a4054 100%);
    color: white;
    font-weight: 600;
}

.codeiq-modal-btn-primary:hover {
    background: linear-gradient(135deg, #c4576a 0%, #c4576a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 87, 106, 0.3);
}

.codeiq-modal-btn-primary:active {
    transform: translateY(0);
}

.codeiq-modal-btn-cancel {
    background: #f5f2ed;
    color: #6b6b6b;
    border: 1px solid #d4d0c8;
}

.codeiq-modal-btn-cancel:hover {
    background: #d4d0c8;
    color: #1a1a1a;
}

/* Modal Type Variations */

/* Success Modal */
.codeiq-modal-success .codeiq-modal-header {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-bottom: none;
}

.codeiq-modal-success .codeiq-modal-icon {
    color: white;
}

.codeiq-modal-success .codeiq-modal-title {
    color: white;
}

.codeiq-modal-success .codeiq-modal-btn-primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.codeiq-modal-success .codeiq-modal-btn-primary:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

/* Error Modal */
.codeiq-modal-error .codeiq-modal-header {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-bottom: none;
}

.codeiq-modal-error .codeiq-modal-icon {
    color: white;
}

.codeiq-modal-error .codeiq-modal-title {
    color: white;
}

.codeiq-modal-error .codeiq-modal-btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.codeiq-modal-error .codeiq-modal-btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Warning Modal */
.codeiq-modal-warning .codeiq-modal-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-bottom: none;
}

.codeiq-modal-warning .codeiq-modal-icon {
    color: white;
}

.codeiq-modal-warning .codeiq-modal-title {
    color: white;
}

.codeiq-modal-warning .codeiq-modal-btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.codeiq-modal-warning .codeiq-modal-btn-primary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ==================== LOW CONFIDENCE MODAL STYLES ==================== */

/* Modal container overrides for low confidence modal */
.low-confidence-modal {
    max-width: 900px !important;
    width: 95% !important;
    max-height: 90vh !important;
}

.low-confidence-modal .codeiq-modal-body {
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
}

/* Confidence Summary Section */
.confidence-summary {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: var(--space-5);
    margin: var(--space-5);
    margin-bottom: var(--space-4);
}

.summary-header h4 {
    margin: 0 0 var(--space-2) 0;
    color: var(--gray-900);
    font-size: 16px;
    font-weight: 600;
}

.summary-header p {
    margin: 0 0 var(--space-4) 0;
    color: var(--gray-600);
    font-size: 14px;
}

.helpful-tips {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: 6px;
    padding: var(--space-3);
    margin-top: var(--space-3);
    font-size: 13px;
    color: var(--primary-700);
}

.remaining-text {
    font-size: 12px;
    color: var(--gray-500);
    transition: color 0.3s ease;
}

.confidence-breakdown {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.breakdown-item {
    padding: var(--space-2) var(--space-3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.breakdown-item.critical {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.breakdown-item.warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

/* Progress Indicator */
.progress-indicator {
    margin-top: var(--space-4);
}

.progress-text {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-400) 0%, var(--success-500) 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Transactions Container */
.transactions-container {
    margin: 0 var(--space-5) var(--space-5) var(--space-5);
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-height: 50vh;
    overflow-y: auto;
    padding-right: var(--space-2);
}

/* Transaction Cards */
.transaction-card {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    background: #ffffff;
    transition: all 0.2s ease;
}

.transaction-card:hover {
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.transaction-card.critical {
    border-left: 4px solid #c4576a;
    background: linear-gradient(135deg, #fdf2f8 0%, #fae8ec 100%);
}

.transaction-card.warning {
    border-left: 4px solid #a855f7;
    background: linear-gradient(135deg, #fdf5f7 0%, #fae8ec 100%);
}

.transaction-card.corrected {
    border-left: 4px solid #8b5cf6;
    background: linear-gradient(135deg, #fdf5f7 0%, #ede9fe 100%);
}

/* Transaction Header */
.transaction-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    flex-wrap: wrap;
    gap: var(--space-2);
}

.confidence-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    color: white;
}

.confidence-badge.critical {
    background: linear-gradient(135deg, #c4576a 0%, #d81b60 100%);
    box-shadow: 0 2px 4px rgba(196, 87, 106, 0.3);
}

.confidence-badge.warning {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    box-shadow: 0 2px 4px rgba(168, 85, 247, 0.3);
}

.confidence-badge.corrected {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.amount {
    font-weight: 600;
    font-size: 14px;
}

.amount.debit {
    color: var(--error-500);
}

.amount.credit {
    color: var(--success-500);
}

.correction-status {
    font-size: 12px;
}

.status-corrected {
    color: var(--success-600);
    font-weight: 500;
}

/* Transaction Details */
.transaction-details {
    margin-bottom: var(--space-2);
}

.description {
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.bank-account {
    font-size: 11px;
    color: var(--gray-500);
}

/* Current Coding */
.current-coding {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    padding: var(--space-2);
    background: linear-gradient(135deg, #fdf5f7 0%, #fdf5f7 100%);
    border-radius: 6px;
    border: 1px solid #e9d5ff;
    font-size: 12px;
    flex-wrap: wrap;
}

.current-label {
    color: var(--gray-600);
    font-weight: 500;
}

.current-account {
    color: var(--gray-900);
    font-weight: 600;
}

.coding-method {
    color: var(--gray-500);
    font-style: italic;
}

/* Correction Controls */
.correction-controls {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    flex-wrap: wrap;
}

.dropdown-container {
    flex: 1;
    min-width: 200px;
}

.modal-account-dropdown {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    background: white;
    font-size: 13px;
    color: var(--gray-900);
    transition: all 0.2s ease;
}

.modal-account-dropdown:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.modal-account-dropdown:disabled {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

.action-buttons {
    display: flex;
    gap: var(--space-2);
}

.apply-btn {
    padding: 6px var(--space-3);
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

.apply-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.apply-btn:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Similar Actions */
.similar-actions {
    margin-bottom: var(--space-2);
}

.apply-similar-btn {
    width: 100%;
    padding: 6px var(--space-3);
    background: linear-gradient(135deg, #fdf5f7 0%, #fae8ec 100%);
    color: #7c3aed;
    border: 1px solid #e9d5ff;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.apply-similar-btn:hover {
    background: linear-gradient(135deg, #fae8ec 0%, #e9d5ff 100%);
    border-color: #d8b4fe;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.15);
}

.similar-pattern {
    font-weight: 600;
}

.similar-count {
    font-weight: 600;
    color: var(--primary-600);
}

/* Learning Feedback */
.learning-feedback {
    padding: var(--space-2) var(--space-3);
    border-radius: 6px;
    font-size: 12px;
}

.feedback-content {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.feedback-content.loading {
    background: linear-gradient(135deg, #fdf5f7 0%, #fae8ec 100%);
    color: #7c3aed;
    border: 1px solid #e9d5ff;
}

.feedback-content.success {
    background: linear-gradient(135deg, #fdf5f7 0%, #ede9fe 100%);
    color: #8b5cf6;
    border: 1px solid #d8b4fe;
}

.feedback-content.error {
    background: linear-gradient(135deg, #fdf2f8 0%, #fae8ec 100%);
    color: #c4576a;
    border: 1px solid #f9a8d4;
}

.feedback-icon {
    font-size: 14px;
}

.feedback-text {
    font-weight: 500;
}

/* Show More Button */
.show-more-container {
    text-align: center;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}

.show-more-btn {
    padding: var(--space-3) var(--space-6);
    background: var(--gray-50);
    color: var(--gray-600);
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Footer Button Customization */
.low-confidence-modal .codeiq-modal-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-light);
    background: var(--gray-50);
}

.low-confidence-modal .codeiq-modal-btn {
    font-size: 14px;
    padding: var(--space-3) var(--space-5);
}

.low-confidence-modal .codeiq-modal-btn-primary {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
}

.low-confidence-modal .codeiq-modal-btn-primary:hover {
    background: linear-gradient(135deg, var(--success-600) 0%, var(--success-700) 100%);
}

.low-confidence-modal .codeiq-modal-btn-secondary {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
}

.low-confidence-modal .codeiq-modal-btn-secondary:hover {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
}

/* Responsive Design */
@media (max-width: 640px) {
    .codeiq-modal {
        max-width: calc(100% - 32px);
        margin: 16px;
    }

    .codeiq-modal-header {
        padding: 16px 20px;
    }

    .codeiq-modal-body {
        padding: 20px;
    }

    .codeiq-modal-footer {
        padding: 12px 20px;
    }

    .codeiq-modal-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* Low confidence modal responsive */
    .low-confidence-modal {
        max-width: calc(100% - 16px) !important;
        width: calc(100% - 16px) !important;
    }

    .confidence-summary,
    .transactions-container {
        margin: var(--space-3);
    }

    .confidence-breakdown {
        flex-direction: column;
        gap: var(--space-2);
    }

    .transaction-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .correction-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .dropdown-container {
        min-width: unset;
    }

    .action-buttons {
        justify-content: stretch;
    }

    .apply-btn {
        flex: 1;
    }
}

/* Dark mode support (if your app has dark mode) */
@media (prefers-color-scheme: dark) {
    .codeiq-modal {
        background: #1a1a1a;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    }

    /* Header gradient remains the same in dark mode - it's already dark */

    .codeiq-modal-message {
        color: #c4c0b8;
    }

    .codeiq-modal-input {
        background: #1a1a1a;
        border-color: #3d3d3d;
        color: #faf8f5;
    }

    .codeiq-modal-input:focus {
        border-color: #c4576a;
    }

    .codeiq-modal-footer {
        background: #1a1a1a;
        border-top-color: #3d3d3d;
    }

    .codeiq-modal-btn-cancel {
        background: #3d3d3d;
        color: #c4c0b8;
        border-color: #6b6b6b;
    }

    .codeiq-modal-btn-cancel:hover {
        background: #6b6b6b;
        color: #faf8f5;
    }
}

/* Animation keyframes for extra smoothness */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
}

/* ==================== REVIEW TABLE IMPROVEMENTS ==================== */

/* Table Wrapper and Scroll Container */
.review-table-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 60px; /* Space for sticky scrollbar */
}

.review-table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    border: 1px solid #d4d0c8;
    border-radius: 8px;
    background: #ffffff;
}

/* Smart Column Width Management */
.review-table {
    width: auto;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

/* Column Widths */
.review-table .col-checkbox {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    overflow: visible !important; /* Allow RiQ flag star to be visible */
    white-space: normal !important; /* Override text truncation */
    position: relative; /* Create stacking context */
}

.review-table .col-date {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

.review-table .col-bank {
    width: 150px;
    min-width: 150px;
    max-width: 200px;
}

.review-table .col-description {
    width: 250px;
    min-width: 200px;
    max-width: 350px;
}

.review-table .col-amount {
    width: 100px;
    min-width: 100px;
    max-width: 120px;
    text-align: right;
}

.review-table .col-vat {
    width: 80px;
    min-width: 80px;
    max-width: 100px;
    text-align: right;
}

.review-table .col-account {
    width: 200px;
    min-width: 180px;
    max-width: 250px;
}

.review-table .col-confidence {
    width: 90px;
    min-width: 90px;
    max-width: 110px;
}

.review-table .col-method {
    width: 120px;
    min-width: 120px;
    max-width: 150px;
}

/* Actions column removed - editing is done inline */

/* Sticky First Columns */
.review-table .sticky-column {
    position: sticky;
    left: 0;
    background: #ffffff;
    z-index: 10;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

/* Ensure checkbox column contents are visible */
.review-table td.sticky-column.col-checkbox {
    overflow: visible !important;
}

.review-table .sticky-column-2 {
    position: sticky;
    left: 60px; /* Width of first column (checkbox) */
    background: #ffffff;
    z-index: 9;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.review-table thead .sticky-column,
.review-table thead .sticky-column-2 {
    background: #faf8f5;
}

.review-table tbody tr:hover .sticky-column,
.review-table tbody tr:hover .sticky-column-2 {
    background: #f5f2ed;
}

/* Sticky Horizontal Scrollbar */
.sticky-table-scrollbar-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1400px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #d4d0c8;
    border-radius: 8px;
    padding: 8px 40px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-table-scrollbar-container.visible {
    opacity: 1;
    visibility: visible;
}

.sticky-scrollbar-track {
    position: relative;
    height: 8px;
    background: #d4d0c8;
    border-radius: 4px;
    cursor: pointer;
}

.sticky-scrollbar-thumb {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(135deg, #9a4054 0%, #9a4054 100%);
    border-radius: 4px;
    cursor: grab;
    transition: background 0.2s;
    min-width: 50px;
}

.sticky-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9a4054 0%, #7e22ce 100%);
}

.sticky-scrollbar-thumb.dragging {
    cursor: grabbing;
    background: linear-gradient(135deg, #7e22ce 0%, #6b21a8 100%);
}

/* Scroll Indicators */
.scroll-indicators {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    pointer-events: none;
}

.scroll-indicator {
    position: absolute;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid #9a4054;
    border-radius: 50%;
    color: #9a4054;
    animation: pulse 2s infinite;
}

.scroll-indicator.left {
    left: 0;
}

.scroll-indicator.right {
    right: 0;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Scroll Shadows */
.review-table-container::before,
.review-table-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s;
}

.review-table-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent);
}

.review-table-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent);
}

.review-table-container.has-scroll-left::before {
    opacity: 1;
}

.review-table-container.has-scroll-right::after {
    opacity: 1;
}

/* Responsive Column Hiding */
@media (max-width: 1400px) {
    .review-table .hide-xl {
        display: none;
    }
}

@media (max-width: 1200px) {
    .review-table .hide-lg {
        display: none;
    }

    .sticky-table-scrollbar-container {
        width: 95%;
    }
}

@media (max-width: 992px) {
    .review-table .hide-md {
        display: none;
    }

    .review-table .col-description {
        max-width: 200px;
    }

    .review-table .col-account {
        max-width: 180px;
    }
}

@media (max-width: 768px) {
    .review-table .hide-tablet {
        display: none;
    }

    .review-table {
        font-size: 12px;
    }

    .review-table .col-description {
        max-width: 150px;
    }

    .sticky-table-scrollbar-container {
        bottom: 10px;
        padding: 6px 30px;
    }
}

@media (max-width: 576px) {
    .review-table .hide-mobile {
        display: none;
    }

    .review-table .col-checkbox {
        width: 55px;
        min-width: 55px;
        overflow: visible; /* Allow RiQ flag star to be visible */
    }

    .review-table .sticky-column-2 {
        left: 55px; /* Match mobile checkbox column width */
    }

    .review-table .col-date {
        width: 80px;
        min-width: 80px;
    }

    .review-table .col-amount {
        width: 80px;
        min-width: 80px;
    }

    .sticky-table-scrollbar-container {
        width: calc(100% - 20px);
        padding: 5px 20px;
    }
}

/* Table Cell Text Truncation */
.review-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 12px;
}

.review-table td.col-description {
    white-space: normal;
    line-height: 1.4;
    word-break: break-word;
}

/* Enhanced Table Styling */
.review-table thead th {
    background: #faf8f5;
    font-weight: 600;
    color: #3d3d3d;
    padding: 10px 12px;
    border-bottom: 2px solid #d4d0c8;
    position: sticky;
    top: 0;
    z-index: 5;
}

.review-table tbody tr {
    border-bottom: 1px solid #f5f2ed;
    transition: background-color 0.2s;
}

.review-table tbody tr:hover {
    background-color: #faf8f5;
}

/* Selected Row Styling */
.review-table tbody tr.selected {
    background-color: #fae8ec;
}

.review-table tbody tr.selected:hover {
    background-color: #ede0ff;
}

/* Visual Scroll Hint */
.scroll-hint {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #9a4054 0%, #9a4054 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 20;
}

.review-table-container:hover .scroll-hint {
    opacity: 1;
}

.scroll-hint.hidden {
    display: none;
}

/* Credits Widget Styles */
.credits-widget {
    position: relative;
    cursor: pointer;
    user-select: none;
}

/* Floating widget positioned below logo */
.credits-widget.floating-widget {
    position: fixed;  /* Changed to fixed to stay in place */
    top: 110px;  /* Much lower to ensure visibility below header */
    left: 20px;  /* Aligned with left edge */
    z-index: 999;  /* Higher z-index to stay above content */
}

.product-shortcuts {
    position: fixed;
    right: 30px;
    bottom: 10px;
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    opacity: 1; /* Fully visible */
    z-index: 9999; /* Above footer content */
    pointer-events: none; /* Allow clicks through container */
}

.product-shortcut {
    display: block;
    pointer-events: auto;
}

.product-shortcut img {
    display: block;
    width: 120px; /* Smaller size for footer */
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-shortcut img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.credits-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fae8ec 0%, #ede9ff 100%);
    border: 1px solid #d8b4fe;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.credits-compact:hover {
    background: linear-gradient(135deg, #ede9ff 0%, #e9d5ff 100%);
    border-color: #d4899a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.15);
}

.credits-icon {
    color: #9a4054;
    flex-shrink: 0;
}

.credits-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.credits-available {
    font-size: 14px;
    font-weight: 600;
    color: #9a4054;
}

.credits-available #availableCredits {
    color: #9a4054;
    font-weight: 700;
}

/* Credits Popover */
.credits-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;  /* Changed from right: 0 to left: 0 for floating widget */
    width: 320px;
    background: white;
    border: 1px solid #d4d0c8;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s ease;
    z-index: 1000;
}

.credits-popover.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Popover Arrow */
.credits-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;  /* Changed from right to left for floating widget */
    width: 12px;
    height: 12px;
    background: white;
    border: 1px solid #d4d0c8;
    border-right: none;
    border-bottom: none;
    transform: rotate(45deg);
}

.popover-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f5f2ed;
    background: linear-gradient(135deg, #fdf5f7 0%, #faf8f5 100%);
    border-radius: 12px 12px 0 0;
}

.popover-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.popover-content {
    padding: 20px;
}

.credit-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.credit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #faf8f5;
    border-radius: 8px;
    transition: background 0.2s;
}

.credit-row:hover {
    background: #f5f2ed;
}

.credit-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b6b6b;
}

.credit-label svg {
    width: 16px;
    height: 16px;
    color: #999999;
}

.credit-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.credit-value.subscription {
    color: #9a4054;
}

.credit-value.bonus {
    color: #10b981;
}

.credit-value.total {
    color: #9a4054;
    font-size: 18px;
}

/* Credit Progress Bar */
.credit-progress {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fdf5f7;
    border: 1px solid #e9d5ff;
    border-radius: 8px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.progress-text {
    color: #6b6b6b;
}

.progress-percent {
    color: #9a4054;
    font-weight: 600;
}

.progress-bar-container {
    height: 6px;
    background: #e9d5ff;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9a4054 0%, #9a4054 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Popover Actions */
.popover-actions {
    padding: 16px 20px;
    border-top: 1px solid #f5f2ed;
    background: #faf8f5;
    border-radius: 0 0 12px 12px;
}

.buy-credits-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #9a4054 0%, #9a4054 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.buy-credits-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* Credit Deduction Animation */
.credit-deduction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #dc2626;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    animation: creditDeduction 1.5s ease-out;
    z-index: 1001;
}

@keyframes creditDeduction {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -100px) scale(0.9);
    }
}

/* Responsive Design for Credits Widget */
@media (max-width: 768px) {
    .credits-widget.floating-widget {
        top: 100px;  /* Lower position for tablet */
        left: 15px;
    }

    .credits-compact {
        padding: 6px 12px;
    }

    .credits-available {
        font-size: 13px;
    }

    .credits-popover {
        width: 280px;
        left: 0;
    }
}

@media (max-width: 576px) {
    .credits-widget.floating-widget {
        top: 90px;  /* Lower position for mobile */
        left: 10px;
    }

    .credits-compact {
        padding: 5px 10px;
    }

    .credits-icon {
        width: 14px;
        height: 14px;
    }

    .credits-available {
        font-size: 12px;
    }

    .credits-popover {
        width: 260px;
        left: 0;
    }
}

/* Credit Cost Notices */
.credit-cost-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    font-size: 12px;
    color: #92400e;
    margin-left: 8px;
}

.credit-cost-notice svg {
    width: 14px;
    height: 14px;
    color: #f59e0b;
}

/* Credits Loading State */
.credits-loading {
    display: inline-block;
    width: 60px;
    height: 20px;
    background: linear-gradient(90deg, #f5f2ed 25%, #d4d0c8 50%, #f5f2ed 75%);
    background-size: 200% 100%;
    animation: creditsLoading 1.5s infinite;
    border-radius: 10px;
}

@keyframes creditsLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== WELCOME MODAL STYLES ==================== */

/* Welcome Modal Container Override */
.codeiq-welcome-modal {
    max-width: 640px !important;
    width: 90% !important;
}

/* Welcome Modal Header */
.welcome-modal-header {
    background: linear-gradient(135deg, #9a4054 0%, #c4576a 100%) !important;
    border: none !important;
    padding: 32px 28px !important;
}

/* Welcome Header Content Layout */
.welcome-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Large RiQ Avatar for Welcome Modal */
.riq-avatar-large {
    flex-shrink: 0;
}

.riq-avatar-large img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    filter: drop-shadow(0 4px 12px rgba(196, 87, 106, 0.4));
}

/* Welcome Title Section with Logo */
.welcome-title-section {
    flex: 1;
}

.welcome-logo-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
}

.welcome-logo-title span {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    font-weight: 500;
}

.welcome-codeiq-logo {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.welcome-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin: 8px 0 0 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Welcome Modal Body */
.welcome-modal-body {
    padding: 32px 28px !important;
}

/* Welcome Section (Main Message) */
.welcome-section {
    margin-bottom: 28px;
    text-align: center;
}

.welcome-section-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.welcome-section-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.welcome-section-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #6b6b6b;
}

/* Welcome Scenarios Container */
.welcome-scenarios {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Scenario Cards */
.scenario-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid;
}

.scenario-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* WITH History Card - Magenta/Purple Gradient */
.scenario-with-history {
    background: linear-gradient(135deg, rgba(196, 87, 106, 0.05) 0%, rgba(154, 64, 84, 0.05) 100%);
    border-color: rgba(196, 87, 106, 0.3);
}

.scenario-with-history:hover {
    background: linear-gradient(135deg, rgba(196, 87, 106, 0.08) 0%, rgba(154, 64, 84, 0.08) 100%);
    border-color: rgba(196, 87, 106, 0.5);
}

/* NEW Companies Card - Purple/Magenta Gradient (Reversed) */
.scenario-new-company {
    background: linear-gradient(135deg, rgba(154, 64, 84, 0.05) 0%, rgba(196, 87, 106, 0.05) 100%);
    border-color: rgba(154, 64, 84, 0.3);
}

.scenario-new-company:hover {
    background: linear-gradient(135deg, rgba(154, 64, 84, 0.08) 0%, rgba(196, 87, 106, 0.08) 100%);
    border-color: rgba(154, 64, 84, 0.5);
}

/* Scenario Icon */
.scenario-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scenario Content */
.scenario-content {
    flex: 1;
}

.scenario-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.scenario-description {
    margin: 12px 0 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b6b6b;
}

/* Accuracy Badges */
.accuracy-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-high {
    background: linear-gradient(135deg, #c4576a 0%, #9a4054 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(196, 87, 106, 0.3);
}

.badge-learning {
    background: linear-gradient(135deg, #9a4054 0%, #c4576a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(154, 64, 84, 0.3);
}

/* Welcome Benefits Section */
.welcome-benefits {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(154, 64, 84, 0.03) 0%, rgba(196, 87, 106, 0.03) 100%);
    border-radius: 12px;
    border: 2px solid rgba(196, 87, 106, 0.15);
}

.benefits-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.benefits-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #9a4054;
    text-align: center;
}

.benefits-list {
    margin: 0;
    padding-left: 24px;
    color: #6b6b6b;
    font-size: 14px;
    line-height: 1.8;
}

.benefits-list li {
    margin-bottom: 8px;
}

.benefits-list li:last-child {
    margin-bottom: 0;
}

.benefits-list li strong {
    color: #c4576a;
    font-weight: 700;
}

/* Welcome Modal Footer */
.welcome-modal-footer {
    padding: 24px 28px !important;
    background: #faf8f5 !important;
    border-top: 1px solid #d4d0c8 !important;
}

/* Get Started Button - Premium Gradient */
.welcome-get-started-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #c4576a 0%, #9a4054 100%);
    color: white;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(196, 87, 106, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.welcome-get-started-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.welcome-get-started-btn:hover::before {
    left: 100%;
}

.welcome-get-started-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 87, 106, 0.4);
    background: linear-gradient(135deg, #c4576a 0%, #5e2768 100%);
}

.welcome-get-started-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(196, 87, 106, 0.3);
}

.btn-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.btn-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-get-started-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Responsive Design for Welcome Modal */
@media (max-width: 768px) {
    .codeiq-welcome-modal {
        width: 95% !important;
    }

    .welcome-modal-header {
        padding: 24px 20px !important;
    }

    .welcome-header-content {
        gap: 16px;
    }

    .riq-avatar-large img {
        width: 64px;
        height: 64px;
    }

    .welcome-codeiq-logo {
        height: 28px;
        filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    }

    .welcome-modal-body {
        padding: 24px 20px !important;
    }

    .scenario-card {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .welcome-get-started-btn {
        padding: 14px 28px;
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .codeiq-welcome-modal {
        width: 98% !important;
    }

    .welcome-modal-header {
        padding: 20px 16px !important;
    }

    .welcome-header-content {
        flex-direction: column;
        text-align: center;
    }

    .riq-avatar-large {
        margin: 0 auto;
    }

    .welcome-logo-title {
        align-items: center;
    }

    .welcome-codeiq-logo {
        height: 24px;
        filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    }

    .welcome-modal-body {
        padding: 20px 16px !important;
    }

    .welcome-scenarios {
        gap: 12px;
    }

    .scenario-card {
        padding: 14px;
    }

    .welcome-benefits {
        padding: 18px;
    }

    .welcome-get-started-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .btn-arrow {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   Review Guide Modal Styles
   ============================================ */

.codeiq-review-guide-modal {
    max-width: 700px;
}

/* Review Guide Header */
.review-guide-header {
    background: linear-gradient(135deg, #c4576a 0%, #9a4054 100%);
    border-bottom: none;
    padding: 32px 28px;
}

.review-guide-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.review-guide-title-section {
    flex: 1;
}

.review-guide-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.review-guide-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin: 8px 0 0 0;
    font-size: 15px;
    line-height: 1.5;
}

/* Review Guide Body */
.review-guide-body {
    padding: 32px 28px !important;
    max-height: 65vh;
    overflow-y: auto;
}

/* Guide Sections */
.guide-section {
    text-align: center;
    margin-bottom: 28px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(196, 87, 106, 0.05), rgba(154, 64, 84, 0.05));
    border-radius: 12px;
    border: 2px solid rgba(196, 87, 106, 0.15);
}

.guide-section-icon {
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-section-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #c4576a, #9a4054);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
}

.guide-section-text {
    color: #6b6b6b;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Guide Tips Grid */
.guide-tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.guide-tip-card {
    background: #ffffff;
    border: 2px solid #d4d0c8;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.guide-tip-card:hover {
    border-color: #c4576a;
    box-shadow: 0 4px 12px rgba(196, 87, 106, 0.1);
    transform: translateY(-2px);
}

.guide-tip-highlight {
    background: linear-gradient(135deg, rgba(196, 87, 106, 0.08), rgba(154, 64, 84, 0.08));
    border-color: #c4576a;
}

.guide-tip-icon {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.guide-tip-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.guide-tip-text {
    font-size: 14px;
    color: #6b6b6b;
    line-height: 1.6;
    margin: 0;
}

/* Guide Benefits Section */
.guide-benefits {
    background: linear-gradient(135deg, rgba(154, 64, 84, 0.05), rgba(196, 87, 106, 0.05));
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(154, 64, 84, 0.15);
}

/* Review Guide Footer */
.review-guide-footer {
    padding: 20px 28px;
    background: linear-gradient(to top, #faf8f5, #ffffff);
    border-top: 1px solid #d4d0c8;
}

.review-guide-start-btn {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, #c4576a, #9a4054);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(196, 87, 106, 0.2);
    position: relative;
    overflow: hidden;
}

.review-guide-start-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.review-guide-start-btn:hover::before {
    left: 100%;
}

.review-guide-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(196, 87, 106, 0.3);
}

.review-guide-start-btn:active {
    transform: translateY(0);
}

.review-guide-start-btn .btn-arrow {
    transition: transform 0.3s ease;
}

.review-guide-start-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Responsive Design for Review Guide */
@media (max-width: 768px) {
    .codeiq-review-guide-modal {
        max-width: 95%;
    }

    .review-guide-header {
        padding: 24px 20px;
    }

    .review-guide-header-content {
        gap: 16px;
    }

    .riq-avatar-large {
        width: 56px;
        height: 56px;
    }

    .review-guide-title {
        font-size: 20px;
    }

    .review-guide-subtitle {
        font-size: 14px;
    }

    .review-guide-body {
        padding: 24px 20px !important;
    }

    .guide-tips-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .guide-section {
        padding: 16px;
    }

    .guide-section-title {
        font-size: 18px;
    }

    .review-guide-start-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .review-guide-header {
        padding: 20px 16px;
    }

    .review-guide-header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .riq-avatar-large {
        width: 48px;
        height: 48px;
    }

    .review-guide-title {
        font-size: 18px;
    }

    .review-guide-body {
        padding: 20px 16px !important;
    }

    .guide-tip-card {
        padding: 16px;
    }

    .guide-benefits {
        padding: 16px;
    }

    .review-guide-start-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}
