.bob-page {
    min-height: 100vh;
    padding-top: var(--nav-height);
    background: linear-gradient(135deg, var(--bob-bg-dark) 0%, #1e1b4b 50%, #312e81 100%);
    position: relative;
    overflow-x: hidden !important;
    /* Prevent side-scroll from hidden panels */
}

/* Document Panel */
.document-panel {
    background: var(--bob-bg-medium);
    border-left: 1px solid var(--bob-border);
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.document-panel.hidden {
    opacity: 0;
    overflow: hidden;
    border-left: none;
}

.document-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--bob-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 80px;
    box-sizing: border-box;
}

.document-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bob-text-primary);
    margin: 0;
}

/* Back to Chat button */
.back-to-chat-btn {
    background: transparent;
    border: none;
    color: var(--bob-text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.back-to-chat-btn:hover {
    background: var(--bob-hover-bg);
    color: var(--bob-text-primary);
}


.btn-new-conversation {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    /* Red-500 */
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-new-conversation:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.document-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    color: var(--bob-text-secondary);
    line-height: 1.8;
}

.document-empty {
    color: var(--bob-text-muted);
    font-style: italic;
    text-align: center;
    margin-top: 2rem;
}

/* Document Sections */
.doc-section {
    margin-bottom: 2rem;
}

.doc-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--bob-text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bob-border);
}

.doc-field {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.doc-label {
    font-weight: 600;
    color: var(--bob-text-primary);
}

.document-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--bob-border);
    min-height: 80px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
}

.btn-submit-application {
    width: 100%;
    background: linear-gradient(135deg, var(--bob-primary), var(--bob-secondary));
    border: none;
    color: var(--bob-text-primary);
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    min-height: 52px;
}

.btn-submit-application:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn-submit-application:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Chat Panel */
.chat-panel {
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-panel.full-width {
    max-width: 800px;
    margin: 0 auto;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--bob-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    min-height: 80px;
    box-sizing: border-box;
}

.bob-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bob-primary), var(--bob-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bob-avatar i {
    font-size: 1.5rem;
    color: var(--bob-text-primary);
}

.bob-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    margin-left: 1rem;
}

.bob-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bob-text-primary);
    margin: 0;
    white-space: nowrap;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.beta {
    background: rgba(234, 179, 8, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

/* Header Rating */
.header-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.rating-label {
    font-size: 0.75rem;
    color: var(--bob-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.star-rating-inline {
    display: flex;
    gap: 0.25rem;
}

.star-rating-inline i {
    font-size: 1.25rem;
    color: var(--bob-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-rating-inline i:hover,
.star-rating-inline i.ph-fill {
    color: #fbbf24;
}

.star-rating-inline i:hover {
    transform: scale(1.1);
}

/* Consent Notice */
.consent-notice {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    padding: 0.75rem 1rem;
    margin: 1rem 1.5rem 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.consent-notice.hidden {
    display: none;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 0.5rem 1.5rem 1.5rem 1.5rem;
    /* Reduced top padding */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlideIn 0.3s ease;
    align-items: flex-start;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.message.bob .message-avatar {
    background: linear-gradient(135deg, var(--bob-primary), var(--bob-secondary));
    color: var(--bob-text-primary);
}

.message.user .message-avatar {
    background: var(--bob-bg-light);
    color: var(--bob-text-secondary);
}

.message-bubble {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 70%;
    min-width: 100px;
}

.message-content {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.875rem 1.125rem;
    border-radius: 16px;
    color: var(--bob-text-secondary);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    width: fit-content;
    hyphens: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--bob-primary), var(--bob-secondary));
    color: var(--bob-text-primary);
    margin-left: auto;
}

.message-time {
    font-size: 0.75rem;
    color: var(--bob-text-muted);
    padding: 0 0.25rem;
}

.message.user .message-time {
    text-align: right;
}

/* System Notifications */
.message.system-notification {
    justify-content: center;
    align-items: center;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    color: #6ee7b7;
}

.notification-content i {
    color: #10b981;
    font-size: 1.25rem;
}

/* Retry Notification */
.message.retry-notification {
    justify-content: center;
    align-items: center;
}

.retry-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(251, 146, 60, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.4);
    border-radius: 8px;
    color: #fb923c;
    /* Orange-500 */
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-content:hover {
    background: rgba(251, 146, 60, 0.25);
    border-color: rgba(251, 146, 60, 0.6);
    transform: scale(1.02);
}

.retry-content i {
    color: #fb923c;
    font-size: 1.25rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem 1rem;
}

.typing-indicator.hidden {
    display: none;
}

.typing-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bob-primary), var(--bob-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: var(--bob-text-primary);
}

.typing-dots {
    display: flex;
    gap: 0.375rem;
    padding: 0.875rem 1.125rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bob-text-muted);
    animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {

    0%,
    60%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Chat Input */
.chat-input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--bob-border);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 80px;
    box-sizing: border-box;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

#chatInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--bob-border);
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    padding-right: 3.5rem;
    /* Space for send button */
    color: var(--bob-text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    transition: all 0.3s ease;
    width: 100%;
}

#chatInput:focus {
    outline: none;
    border-color: var(--bob-primary);
    background: rgba(255, 255, 255, 0.08);
}

#chatInput::placeholder {
    color: var(--bob-text-muted);
}

.btn-send {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    background: linear-gradient(135deg, var(--bob-primary), var(--bob-secondary));
    border: none;
    color: var(--bob-text-primary);
    padding: 0.625rem;
    border-radius: 8px;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    opacity: 1;
    transform: scale(1);
}

.btn-send.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.btn-send:hover:not(.hidden) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

/* Input Actions */
.input-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    align-items: center;
}

.action-btn {
    background: transparent;
    border: 1px solid var(--bob-border);
    color: var(--bob-text-secondary);
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--bob-primary);
    color: var(--bob-primary);
}

.action-btn i {
    font-size: 1rem;
}

.action-btn.copied {
    border-color: var(--bob-success);
    color: var(--bob-success);
    background: rgba(16, 185, 129, 0.1);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bob-bg-medium);
    border: 1px solid var(--bob-border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--bob-text-muted);
    font-size: 2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--bob-text-primary);
}

.modal-content h3 {
    color: var(--bob-text-primary);
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.feedback-subtitle {
    color: var(--bob-text-muted);
    margin: 0 0 1.5rem 0;
}

/* Star Rating */
.feedback-rating {
    margin-bottom: 1.5rem;
}

.feedback-rating label {
    display: block;
    color: var(--bob-text-secondary);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.star-rating {
    display: flex;
    gap: 0.5rem;
    font-size: 2rem;
}

.star-rating i {
    color: var(--bob-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-rating i:hover,
.star-rating i.active {
    color: #fbbf24;
    transform: scale(1.1);
}

/* Feedback Comment */
.feedback-comment textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--bob-border);
    border-radius: 8px;
    padding: 0.875rem;
    color: var(--bob-text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.feedback-comment textarea:focus {
    outline: none;
    border-color: var(--bob-primary);
}

.feedback-comment textarea::placeholder {
    color: var(--bob-text-muted);
}

/* Modal Actions */
.feedback-actions,
.confirm-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bob-primary), var(--bob-secondary));
    color: var(--bob-text-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--bob-text-secondary);
    border: 1px solid var(--bob-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Confirm Dialog */
.confirm-dialog {
    max-width: 400px;
}

.confirm-dialog p {
    color: var(--bob-text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    white-space: pre-line;
}

/* Info Dialog */
.info-dialog {
    max-width: 450px;
    text-align: center;
}

.info-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--bob-primary), var(--bob-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon i {
    font-size: 2rem;
    color: var(--bob-text-primary);
}

.info-dialog h3 {
    margin-bottom: 1rem;
}

.info-dialog p {
    color: var(--bob-text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    white-space: pre-line;
}

.info-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Bob Page Styles - Mobile Version */

/* ===== HIDE MOBILE TABS ===== */
.mobile-tabs {
    display: none !important;
}

/* ===== LAYOUT ===== */
.bob-container {
    height: calc(100vh - var(--nav-height));
    position: relative;
    overflow-x: hidden !important;
    /* Clip translated panels */
}

/* ===== PANELS ===== */
.document-panel,
.chat-panel {
    width: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Chat panel visible by default */
.chat-panel {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* Document panel hidden by default */
.document-panel {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.document-panel.hidden {
    width: 100% !important;
    opacity: 0;
    transform: translateX(100%);
}

/* When showing document, slide it in from right */
body.show-document .document-panel {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    z-index: 20;
}

body.show-document .chat-panel {
    pointer-events: none;
}

/* ===== GREEN "TO APPLICATION" BUTTON (in chat input area) ===== */
.btn-to-application {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: var(--bob-text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: none;
    /* Hidden by default */
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    margin-left: auto;
}

.btn-to-application:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-to-application.visible {
    display: flex !important;
}

/* ===== GREEN "BACK TO CHAT" BUTTON (in document header) ===== */
.back-to-chat-btn {
    display: flex;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: var(--bob-text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.back-to-chat-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* ===== HIDE OLD BUTTONS ===== */
#btnShowApplication {
    display: none !important;
}

/* ===== MESSAGE ADJUSTMENTS ===== */
.message-content {
    max-width: 85%;
}

/* ===== INPUT ACTIONS ===== */
.input-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
}

/* Ensure both buttons fill their grid cells equally */
.input-actions .btn-new-conversation,
.input-actions .btn-to-application {
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    padding: 0.5rem 0.25rem;
    /* Slightly less horizontal padding to fit text */
    font-size: 0.875rem;
    white-space: nowrap;
    gap: 0.375rem;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}


/* ===== DOCUMENT PANEL ===== */
.document-panel {
    background: rgba(15, 23, 42, 0.92) !important;
    /* Semi-transparent background */
    display: flex !important;
    /* Override .hidden utility class */
}

/* Ensure hidden state is handled effectively by opacity/transform, 
   but we MUST have display:flex for it to ever show up */
.document-panel.hidden {
    display: flex !important;
    width: 100% !important;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

/* ===== DOCUMENT HEADER ===== */
.document-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--bob-border);
}

.document-header h2 {
    margin: 0;
}

/* Hide the back button from header on mobile - it will be in footer */
.document-header .back-to-chat-btn {
    display: none;
}

/* ===== DOCUMENT FOOTER LAYOUT ===== */
.document-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.75rem;
    padding: 1rem;
}

/* Copy button - left side, first row */
.document-footer .action-btn {
    grid-column: 1;
    grid-row: 1;
}

/* Back to Chat button (footer version) - right side, first row */
.document-footer #btnBackToChatFooter {
    grid-column: 2;
    grid-row: 1;
    display: flex !important;
    /* Show in footer */
}

/* Submit button - full width, second row */
.document-footer .btn-submit-application {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
}

/* Hide Start Over from document footer on mobile */
.document-footer .btn-new-conversation {
    display: none !important;
}

@media (max-width: 480px) {
    .chat-header {
        padding: 0.75rem 1rem;
        flex-wrap: nowrap;
        /* Prevent wrapping to keep rating in the corner */
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .bob-avatar {
        width: 36px;
        height: 36px;
    }

    .bob-info {
        margin-left: 0.5rem;
        gap: 0.5rem;
    }

    .bob-info h3 {
        font-size: 0.9rem;
    }

    .status-badge.beta {
        padding: 0.1rem 0.4rem;
        font-size: 0.6rem;
    }

    /* Keep header rating in the top-right corner */
    .header-rating {
        width: auto;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        margin-top: 0;
        gap: 2px;
    }

    .star-rating-inline i {
        font-size: 1.25rem;
        /* Larger stars for easier touch */
        padding: 4px;
        /* Larger hit area */
    }
}


/* ===== FEEDBACK WIDGET (MOBILE) ===== */
.bob-feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: block;
    /* Use block, child is absolute */
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    pointer-events: none;
    /* Disable when invisible */
    touch-action: none;
    /* Prevent scrolling background */
}

.bob-feedback-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.bob-feedback-modal {
    background: var(--bob-bg-medium, #1e293b);
    border-radius: 28px 28px 0 0;
    padding: 2.5rem 1.5rem calc(2rem + env(safe-area-inset-bottom));
    width: 100%;
    max-width: 100%;
    max-height: 95vh;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    margin: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

.bob-feedback-modal * {
    box-sizing: border-box;
}

.bob-feedback-overlay.active .bob-feedback-modal {
    transform: translateY(0);
}

.bob-feedback-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--bob-text-muted, #94a3b8);
    font-size: 2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.bob-feedback-modal h3 {
    color: var(--bob-text-primary, #ffffff);
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.bob-feedback-subtitle {
    color: var(--bob-text-muted, #94a3b8);
    margin: 0 0 1.5rem 0;
}

.bob-star-rating {
    display: flex;
    gap: 0.5rem;
    font-size: 1.75rem;
    /* Smaller stars to fit all screens */
    margin-bottom: 2rem;
    justify-content: center;
    padding: 1rem 0;
    width: 100%;
}

.bob-star-rating i {
    font-size: 2.5rem;
    color: var(--bob-text-muted, #94a3b8);
    cursor: pointer;
    flex-shrink: 0;
}

.bob-star-rating i.active {
    color: #fbbf24;
}

.bob-feedback-comment textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--bob-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: 1rem;
    color: var(--bob-text-primary, #ffffff);
    font-size: 1.1rem;
    font-family: inherit;
    resize: none;
    min-height: 100px;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.bob-feedback-actions {
    display: flex;
    flex-direction: column-reverse;
    /* Put Submit on top of Skip */
    gap: 0.75rem;
    width: 100%;
    margin-top: 2rem;
}

.bob-btn-primary,
.bob-btn-secondary {
    width: 100%;
    padding: 1.125rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bob-btn-primary {
    background: linear-gradient(135deg, var(--bob-primary, #4f46e5), var(--bob-secondary, #7c3aed));
    color: var(--bob-text-primary, #ffffff);
}


/* ===== GENERAL MODALS (MOBILE BOTTOM SHEET) ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: block;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    touch-action: none;
    pointer-events: none;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: var(--bob-bg-medium, #1e293b);
    border-radius: 28px 28px 0 0;
    padding: 2.5rem 1.5rem calc(2rem + env(safe-area-inset-bottom));
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    margin: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    color: var(--bob-text-primary, #ffffff);
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.modal-content p {
    color: var(--bob-text-secondary, #cbd5e1);
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

/* Modal Actions (Confirm/Info) */
.confirm-actions,
.info-actions {
    display: flex;
    flex-direction: column-reverse;
    /* Primary on top for mobile */
    gap: 0.75rem;
    width: 100%;
}

.confirm-actions .btn-primary,
.confirm-actions .btn-secondary,
.info-actions .btn-primary {
    width: 100%;
    padding: 1.125rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bob-primary, #4f46e5), var(--bob-secondary, #7c3aed));
    color: var(--bob-text-primary, #ffffff);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--bob-text-secondary, #cbd5e1);
    border: 1px solid var(--bob-border, rgba(255, 255, 255, 0.1));
}

/* Info Icon */
.info-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--bob-primary, #4f46e5), var(--bob-secondary, #7c3aed));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.info-icon i {
    font-size: 2rem;
    color: #ffffff;
}

/* ===== HEADER OVERRIDES FOR BOB PAGE (MOBILE) ===== */
@media (max-width: 1024px) {

    /* Prevent the entire page from being wider than viewport */
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative;
    }

    /* Fix navbar width and positioning */
    .navbar {
        width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Hide the 'Discuss Project' button to free up space */
    .navbar .nav-cta {
        display: none !important;
    }

    /* Optimize container padding for small screens */
    .navbar .nav-container {
        padding: 0 1rem !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    /* Make logo more compact */
    .navbar .logo-name {
        font-size: 0.95rem !important;
    }

    .navbar .logo-surname {
        font-size: 0.85rem !important;
    }

    .navbar .nav-logo {
        flex-shrink: 1;
        min-width: 0;
    }
}