/* Global Reset and General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(title);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2c3e50;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    font-size: 12px;
    max-width: 300px;
    text-overflow: ellipsis;
    overflow: visible;
}

/* Rest of the existing styles.css */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    color: #ffffff;
}

h2, h3 {
    color: #2c3e50;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.hidden {
    display: none !important;
}

.active {
    background-color: #ecf0f1;
}

/* Sidebar */
.sidebar {
    background-color: #2c3e50;
    color: white;
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 24px;
    margin-right: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: color 0.3s ease;
    background-color: transparent;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    color: #ecf0f1;
}

.nav-item.active {
    background-color: #1abc9c;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 50%;
    background-color: #fff;
    border-radius: 2px;
}

.nav-text {
    margin-left: 10px;
}

/* Main Content */
.main-content {
    height: 100%;
    margin-left: 270px;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #fff;
    border-bottom: 2px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.top-header h2 {
    font-size: 1.5em;
    color: #2c3e50;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-size: 1em;
    color: #7f8c8d;
}

.logout-btn {
    background-color: #e74c3c;
    padding: 8px 15px;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Chat Section */
.chat-container {
    background-color: white;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.chat-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.chat-controls select {
    flex: 1;
    max-width: 200px;
}

#clearButton.clear-chat-btn {
    background-color: #7f8c8d;
    width: 40px;
    height: 40px;
    margin-top: 10px;
}

#createCustomModelBtn.create-custommodel-btn {
    background-color: #4CAF50;
    padding: 4px 8px;
      font-size: 12px;
      line-height: 1.1;
      height: 40px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border-radius: 6px; /* match your UI */
      margin: 10px 0px;
}

#clearButton.clear-chat-btn:hover {
    background-color: #5d6d7e;
}

.chat-window {
    height: 400px;
    flex: 1 1 auto;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

.input-wrapper {
    flex-grow: 1;
    position: relative;
}

#inputField {
    padding-right: 40px;
}

#speechPreview {
    position: absolute;
    bottom: 100%;
    left: 0;
    background-color: #ecf0f1;
    padding: 5px;
    border-radius: 5px;
    font-size: 14px;
    display: none;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    max-width: 1200px;
    white-space: normal;
    z-index: 10;
}

#speechPreview.active {
    display: block !important;
}

#micButton, #sendButton {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    background-color: #3498db;
    margin-top: 20px;
}

#micButton:hover, #sendButton:hover {
    background-color: #2980b9;
}

.suggestions {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.suggestions p {
    margin: 5px 0;
    cursor: pointer;
}

.suggestions p:hover {
    background-color: #e0e0e0;
}

/* Prep Section */
.prep-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prep-form {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

.form-column {
    flex: 1;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    min-width: 0;
    min-height: 300px;
}

.form-item {
    margin-bottom: 20px;
    position: relative;
}

.form-item textarea {
    resize: vertical;
    min-height: 100px;
}

.file-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-note {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: 5px;
    min-height: 100px;
}

#prepResumeText {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    margin-bottom: 10px;
    word-wrap: break-word;
    min-height: 100px;
}

#prepResumeText.show-more {
    max-height: none;
    overflow: visible;
}

#showMoreBtn, #showLessBtn {
    display: none;
    padding: 5px 10px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #333333;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 5px;
    width: 100px;
}

#showMoreBtn:hover, #showLessBtn:hover {
    background-color: #e0e0e0;
}

.prep-actions {
    display: flex;
    gap: 10px;
}

.prep-actions button {
    flex: 1;
}

.prep-output {
    width: 100%;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.prep-output h3 {
    margin-bottom: 10px;
}

.clear-prep-btn {
    background-color: #7f8c8d;
}

.clear-prep-btn:hover {
    background-color: #5d6d7e;
}

/* Mock Interview Styles */
.mock-interview-output {
    width: 100%;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
}

#interview-timer {
    font-size: 1.1em;
    color: #e74c3c;
    margin-bottom: 10px;
}

#interview-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#interview-progress progress {
    width: 100%;
}

.record-btn.recording {
    background-color: #ff4d4d;
    color: white;
}

#live-transcript {
    color: #555;
    font-style: italic;
}

#current-question {
    font-size: 1.2em;
    margin: 10px 0;
    color: #2c3e50;
}

#answer-output, #feedback-output {
    margin: 10px 0;
}

#answer-output pre {
    background: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
}

#answer-btn, #speak-btn, #next-btn, #submit-code-btn {
    background-color: #3498db;
    margin-right: 10px;
    padding: 10px 15px;
}

#answer-btn:hover, #speak-btn:hover, #next-btn:hover, #submit-code-btn:hover {
    background-color: #2980b9;
}

#next-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#manual-answer {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#code-editor, #code-input {
    width: 100%;
    height: 200px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    font-family: monospace;
    font-size: 14px;
}

#submit-code-btn {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#submit-code-btn:hover {
    background-color: #0056b3;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .prep-form {
        flex-direction: column;
    }
    .form-column {
        flex: none;
        width: 100%;
        min-height: 250px;
    }
    .form-note, #prepResumeText {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .form-column {
        padding: 10px;
        min-height: 200px;
    }
    .form-note, #prepResumeText {
        min-height: 60px;
    }
}

.prep-output pre {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

#mock-feedback {
    background-color: #ecf0f1;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

#coding-editor {
    margin-top: 10px;
}

#ace-editor {
    border: 1px solid #ddd;
    border-radius: 5px;
}

#mock-timer {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #2c3e50;
}

#mockInterviewOutput {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

#prepOutput {
    margin-top: 10px;
    padding: 10px;
}

#mockInterviewToggleBtn {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#mockInterviewToggleBtn.active {
    background-color: #dc3545; /* Red for "Stop" state */
}

.message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.message.error {
    background-color: #ffe6e6;
    color: red;
    border: 1px solid red;
}

.message.success {
    background-color: #e6ffe6;
    color: green;
    border: 1px solid green;
}

.prep-output {
    margin-top: 20px;
}

/* Mock Interview Form */
.mock-interview-form .form-item,
#language-selector {
    margin-bottom: 15px;
}

.mock-interview-form label,
#language-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.mock-interview-form .required {
    color: #e74c3c;
    font-weight: bold;
}

.mock-interview-form input,
.mock-interview-form textarea,
#language-selector select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.mock-interview-form textarea {
    min-height: 100px;
    resize: vertical;
}

.mock-interview-form button {
    background-color: #00bcd4;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mock-interview-form button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.mock-interview-form button:hover:not(:disabled) {
    background-color: #0097a7;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.loading-spinner.hidden {
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00bcd4;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mock Interview Styles */
.mock-interview-container {
    width: 100%;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#timer-display {
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 10px;
    font-size: 1.2em;
}

#mock-question {
    font-size: 1.2em;
    margin: 10px 0;
    color: #2c3e50;
}

#code-editor {
    width: 100%;
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.mock-answer-input {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.mock-actions {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

#mock-feedback {
    background-color: #ecf0f1;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

#download-report{
    background-color: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

#download-report:hover{
    background-color: #2980b9;
}

#interview-history {
    margin-top: 20px;
}

/*#history-list li {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}*/

/*PDF viewer*/
#pdf-viewer {
   display: none;
   width: 100%;
   height: 500px;
   overflow: auto;
   border: 1px solid #ccc;
   margin-top: 10px;
}
#pdf-viewer canvas {
   display: block;
   margin-bottom: 10px;
}
.report-actions {
   margin-top: 10px;
}
.report-actions button {
   margin-right: 10px;
}

/* Analytics Tab */
#analytics-charts {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#score-trend-chart, #question-type-chart {
    max-width: 100%;
    height: 300px;
}

#pdf-viewer {
    display: none;
    width: 100%;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #ccc;
    margin-top: 10px;
    background: #f9f9f9;
}

#pdf-viewer canvas {
    display: block;
    margin: 10px auto;
    border: 1px solid #ddd;
}

.report-actions {
    margin-top: 10px;
}

.report-actions button {
    margin-right: 10px;
    padding: 8px 16px;
    display: inline-block;
}

#pdf-loading {
    display: none;
    text-align: center;
    padding: 10px;
    color: #555;
}

#answer-input {
    width: 100%;
    height: 100px;
    margin-top: 10px;
}

.tab-section.hidden {
    display: none !important;
}

.resume-parsing-output {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    background: #f9f9f9;
}

#mock-question.hidden,
#answer-input.hidden,
.mock-actions.hidden,
#code-editor[style*="display: none"],
#language-selector[style*="display: none"],
#pdf-viewer[style*="display: none"],
#pdf-loading[style*="display: none"] {
    display: none !important;
}

#history-list {
    list-style-type: none; /* Remove the default bullet points */
    padding: 0; /* Remove default padding */
     margin: 0; /* Remove default margin */
}

#history-list li {
    list-style: none; /* Ensure no bullet points are applied */
    margin-bottom: 10px; /* Add spacing between history entries */
}

.history-entry {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.history-entry .download-btn,
.history-entry .view-btn {
    margin-right: 10px;
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.history-entry .download-btn:hover,
.history-entry .view-btn:hover {
    background-color: #45a049;
}

.history-entry .pdf-viewer {
    position: relative;
    background-color: #f5f5f5;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.history-entry .pdf-viewer button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    z-index: 1000;
}

.history-entry .pdf-viewer button:hover {
    background-color: #cc0000;
}

.history-entry .pdf-loading {
    margin-top: 10px;
    color: #666;
}

/* Resume Preparation Styles */
.resume-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.resume-form {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

.resume-actions {
    display: flex;
    gap: 10px;
}

.resume-actions button {
    flex: 1;
    background-color: #00bcd4;
}

.resume-actions button:hover {
    background-color: #0097a7;
}

.resume-output {
    width: 100%;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.resume-preview {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    background-color: white;
    min-height: 200px;
    overflow-y: auto;
}

.resume-versions {
    margin-top: 20px;
}

.resume-versions h3 {
    margin-bottom: 10px;
}

#resume-versions-list {
    list-style: none;
    padding: 0;
}

#resume-versions-list li {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#resume-versions-list li button {
    padding: 5px 10px;
    margin-left: 5px;
    border-radius: 5px;
    cursor: pointer;
}

#resume-versions-list .select-btn {
    background-color: #007bff;
}

#resume-versions-list .select-btn:hover {
    background-color: #0056b3;
}

#resume-versions-list .delete-btn {
    background-color: #dc3545;
}

#resume-versions-list .delete-btn:hover {
    background-color: #c82333;
}

.work-experience-entry {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.work-experience-entry .form-item {
    margin-bottom: 10px;
}

.work-experience-entry .remove-btn {
    background-color: #dc3545;
    color: white;
    padding: 5px 10px;
}

.work-experience-entry .remove-btn:hover {
    background-color: #c82333;
}

.add-btn {
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
}

.add-btn:hover {
    background-color: #218838;
}

.use-ai-btn {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ff9800;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.use-ai-btn .sparkle-icon {
    font-size: 14px;
}

.use-ai-btn:hover {
    background-color: #e68900;
}

.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 14px;
    max-width: 90%;
    text-align: center;
    animation: slideIn 0.3s ease-in-out, slideOut 0.3s ease-in-out 4.7s;
    display: none;
}

.message.error {
    background-color: #ffe6e6;
    color: red;
    border: 1px solid red;
}

.message.success {
    background-color: #e6ffe6;
    color: green;
    border: 1px solid green;
}

.message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

@keyframes slideIn {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translate(-50%, 0); opacity: 1; }
    to { transform: translate(-50%, -100%); opacity: 0; }
}

.processing-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #2196f3;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.processing-message .spinner {
    border: 3px solid #ffffff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .prep-form, .resume-form {
        flex-direction: column;
    }
    .form-column {
        flex: none;
        width: 100%;
        min-height: 250px;
    }
    .form-note, #prepResumeText, #resume-upload-text {
        min-height: 80px;
    }
    .use-ai-btn {
        position: static;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .form-column {
        padding: 10px;
        min-height: 200px;
    }
    .form-note, #prepResumeText, #resume-upload-text {
        min-height: 60px;
    }
}

.prep-output pre, .resume-output pre {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

/* Job Search Styles */
.job-search-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.job-search-form {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

#job-search-results, #job-applications {
    margin-top: 20px;
}

#job-search-results h3, #job-applications h3 {
    margin-bottom: 10px;
}

.job-list {
    list-style: none;
    padding: 0;
}

.job-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.job-card h4 {
    margin: 0;
    color: #2c3e50;
}

.job-card p {
    margin: 5px 0;
    font-size: 0.9em;
}

.job-card .job-actions {
    display: flex;
    gap: 10px;
}

.job-card .apply-btn {
    background-color: #28a745;
}

.job-card .apply-btn:hover {
    background-color: #218838;
}

.job-card .tailor-resume-btn {
    background-color: #007bff;
}

.job-card .tailor-resume-btn:hover {
    background-color: #0056b3;
}

.job-card .auto-apply-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
}

#application-list {
    list-style: none;
    padding: 0;
}

.application-card {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.application-card .download-btn {
    background-color: #3498db;
}

.application-card .download-btn:hover {
    background-color: #2980b9;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .prep-form, .resume-form, .job-search-form {
        flex-direction: column;
    }
    .form-column {
        flex: none;
        width: 100%;
        min-height: 250px;
    }
    .form-note, #prepResumeText, #resume-upload-text, #job-resume-text {
        min-height: 80px;
    }
    .use-ai-btn {
        position: static;
        margin-bottom: 5px;
    }
    .credential-entry {
        flex-direction: column;
        align-items: stretch;
    }
    .credential-entry select,
    .credential-entry input {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .form-column {
        padding: 10px;
        min-height: 200px;
    }
    .form-note, #prepResumeText, #resume-upload-text, #job-resume-text {
        min-height: 60px;
    }
}

.prep-output pre, .resume-output pre {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

/* job card */
.job-card {
    width: 250px;
    height: 150px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
    margin: 10px;
    display: inline-block;
    vertical-align: top;
    font-size: 12px;
    overflow: hidden;
}

.job-card h4 {
    margin: 0 0 5px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-card p {
    margin: 2px 0;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-card-actions {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.job-card-actions button, .job-card-actions a {
    font-size: 10px;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
}

.tailor-resume-btn {
    background: #007bff;
}

.download-btn {
    background: #28a745;
}

.apply-btn {
    background: #dc3545;
}

.view-details-btn {
    background: #6c757d;
}

.job-link {
    background: #17a2b8;
}

.job-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
}

.auto-apply-section, .auto-apply-checkbox {
    display: flex;
    align-items: left;
    gap: 5px;
    margin: 10px 0;
}

.auto-apply-section input[type="checkbox"], .auto-apply-checkbox input[type="checkbox"] {
    margin: 0;
    vertical-align: left;
}

.auto-apply-section label, .auto-apply-checkbox label {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    display: inline-flex;
    align-items: center;
    flex-direction: row-reverse;
}

/*job filter*/

.job-filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.job-filter-bar select, .job-filter-bar input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.job-filter-bar button {
    background-color: #007bff;
}

.job-filter-bar button:hover {
    background-color: #0056b3;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background-color: #00bcd4;
    transition: width 0.3s ease;
}

.code-block pre code {
    white-space: pre-wrap;
    display: block;
    overflow-x: auto;
}


/* Maximize button */
.maximize-btn {
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: auto;
    width: 40px;
    height: 40px;
    margin-top: 10px;
}

.maximize-btn:hover {
    background-color: #2980b9;
}

/* Hide non-essential UI in fullscreen */
.fullscreen-chat .sidebar,
.fullscreen-chat .top-header,
.fullscreen-chat .chat-controls {
    display: none;
}

.fullscreen-chat .main-content {
    margin-left: 0;
    width: 100vw;
    height: 100vh;
    padding: 0;
}

/* Chat container takes full height */
.fullscreen-chat .chat-container {
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}


/* Fixed top-right bar for mic, send, and preview */
.fullscreen-chat .chat-top-right {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 9999;
}

.fullscreen-chat #speechPreviewFull {
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 10px;
    max-width: 300px;
    white-space: normal;
    overflow-wrap: break-word;
    display: none;
}

.fullscreen-chat #speechPreviewFull.active {
    display: block;
}

/* Input area becomes a fixed bar under top buttons */
.fullscreen-chat .chat-input-area textarea {
    flex: 1;
    max-height: 80px;
    font-size: 1.2em;
    background: rgba(255, 255, 255, 0.8);
    color: #000;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 10px;
}

.fullscreen-chat #speechPreview {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    margin-right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    max-width: 300px;
    overflow-wrap: break-word;
    display: none;
}

.fullscreen-chat #speechPreview.active {
    display: block;
}

.fullscreen-chat #speechPreviewFull {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 10px;
    max-width: 300px;
    white-space: normal;
    overflow-wrap: break-word;
    display: none;
}

.fullscreen-chat #speechPreviewFull.active {
    display: block;
}

.fullscreen-chat .chat-window {
    padding-top: 80px;   /* leave space for top bar */
    padding-bottom: 100px; /* leave space for bottom input */
    height: 600px
}

.chat-thread {
    margin-bottom: 40px;
}

/* Prevent page scroll */
.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Fullscreen Chat Container */
.fullscreen-chat .chat-container {
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

/* Fixed Input Bar in Fullscreen */
.fullscreen-chat .chat-input-area {
    position: fixed;
    top: env(safe-area-inset-top, 10px);
    left: 0;
    right: 0;
    height: 70px;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Textarea in Fullscreen */
.fullscreen-chat .chat-input-area textarea {
    flex-grow: 1;
    min-width: 0;
    resize: none;
    height: 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
}

.fullscreen-chat #micButtonFull,
.fullscreen-chat #sendButtonFull {
    background-color: #3498db;
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-size: 16px;
    height: 40px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
    cursor: pointer;
    margin-top: 60px; /* adjust to your taste */
}

.fullscreen-chat #micButtonFull:hover,
.fullscreen-chat #sendButtonFull:hover {
    background-color: #2980b9;
}

/* Chat Window in fullscreen */
.fullscreen-chat .chat-window {
    margin-top: 1px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding-bottom: 300px;
}

/* help*/
.help-container {
    background: #ffffff;
   /* max-width: 600px;*/
    margin: 40px auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    color: #333;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.help-container .help-title {
    color: #007bff;
    font-size: 28px;
    margin-bottom: 15px;
}

.help-container .help-title i {
    margin-right: 10px;
}

.help-container .help-text,
.help-container .help-note,
.help-container .help-footer {
    font-size: 16px;
    margin: 10px 0;
}

.help-container .help-email {
    font-size: 18px;
    margin: 15px 0;
}

.help-container .help-email a {
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
}

.help-container .help-email a:hover {
    text-decoration: underline;
}

.help-container .help-registered-email {
    display: inline-flex;
    align-items: center;
    background: #f1f1f1;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    margin: 15px 0;
}

.help-container .help-registered-email i {
    color: #007bff;
    margin-right: 8px;
    font-size: 20px;
}

/* *****/

.password-rules {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
  font-size: 0.9em;
}

.password-rules li.invalid  {
  color: red;
  margin-bottom: 5px;
}

.password-rules li.valid {
  color: green !important;
}

.checkbox-container {
  display: flex;
  align-items: center;
  font-size: 0.9em;
}

.checkbox-container input[type="checkbox"] {
  margin-right: 8px;
}

/****privacy and terms ***/
.legal-container {
  background: white;
  max-width: 800px;
  margin: 40px auto;
  padding: 30px;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  color: #333;
  font-size: 9px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.legal-container h1 {
  font-weight: bold;
  font-size: 11px;
  margin-bottom: 15px;
  color: #333;
}

.legal-container h2 {
  font-weight: bold;
  font-size: 10px;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #333;
}

.legal-container p {
  margin-bottom: 8px;
}

a {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

/*************************/


/* Saved Models/User List — match admin look */
.saved-list { list-style: none; }
.saved-item .model-details,
.saved-item .user-details { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.saved-item .edit-form { display: none; flex-direction: column; gap: 10px; }
.saved-item .edit-form.model-edit,
.saved-item .edit-form.user-edit { display: none; }
.saved-item .edit-form.active { display: flex; }
.saved-item textarea { flex-grow: 1; margin-right: 10px; }
.saved-item button { padding: 5px 10px; margin-left: 5px; border-radius: 5px; cursor: pointer; }
.edit-btn, .save-btn { background-color: #007bff; }
.edit-btn:hover, .save-btn:hover { background-color: #0056b3; }
.delete-btn { background-color: #dc3545; }
.delete-btn:hover { background-color: #c82333; }


.sessions-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: #fff;
}
.sessions-table th, .sessions-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e6e6e6;
  text-align: left;
  font-size: 14px;
}
.sessions-table th { background: #f7f8fa; font-weight: 600; }
.sessions-table tr:hover { background: #fafafa; }
.table-wrap { overflow-x: auto; }
.view-details-btn { background: #6c757d; color: #fff; border: none; padding: 6px 10px; border-radius: 4px; cursor: pointer; }
.view-details-btn:hover { opacity: 0.9; }
.close-btn { background: transparent; border: none; font-size: 18px; cursor: pointer; }

.subpage-head { display:flex; align-items:center; gap:12px; margin:10px 0 8px; }
.back-link { border:1px solid #ddd; padding:6px 10px; border-radius:8px; cursor:pointer; }
.subpage-title { margin:0; }

.meta { font-size: 14px; color:#444; display:flex; gap:16px; flex-wrap:wrap; margin:6px 0 14px; }
.tab-strip { display:flex; gap:8px; margin: 12px 0; }
.tab-btn { border:1px solid #e3e3e3; padding:8px 12px; border-radius:8px; background:#f7f8fa; cursor:pointer; }
.tab-btn.active { background:#e9eefc; border-color:#cbd5ff; }
.tab-panel { display:none; }
.tab-panel.active { display:block; }

.list { border:1px solid #eee; border-radius:8px; overflow:hidden; background:#fff; }
.row { display:grid; grid-template-columns: 64px 1fr 220px; gap:12px; padding:10px 12px; border-bottom:1px solid #f0f0f0; }
.row:last-child { border-bottom:none; }
.row .idx { color:#666; }
.row .time { color:#666; font-size: 13px; text-align:right; white-space:nowrap; }
.row.clickable { cursor:pointer; }

.modal-mask { position:fixed; inset:0; background:rgba(0,0,0,.4); display:none; align-items:center; justify-content:center; z-index:1000; }
.modal { background:#fff; max-width:800px; width:calc(100% - 32px); border-radius:10px; padding:16px; }
.modal .close { float:right; border:none; background:transparent; font-size:18px; cursor:pointer; }
.ai-block { margin-top:6px; white-space:pre-wrap; }
@media (max-width: 700px) { .row { grid-template-columns: 48px 1fr 120px; } }

/* Sessions detail: keep tabs visible while scrolling */
#session-detail-view .tab-strip {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  padding: 10px 8px;
  border-bottom: 1px solid #eaeaea;
}

/* Make tab buttons more prominent & accessible */
#session-detail-view .tab-btn {
  border: 1px solid #d1d5db;        /* darker border for contrast */
  background: #f3f4f6;              /* slightly darker neutral */
  color: #111827;
  font-weight: 600;
}
#session-detail-view .tab-btn:hover { background:#f8fafc; }
#session-detail-view .tab-btn.active {
  background: #e0e7ff;              /* clearer active */
  border-color: #a5b4fc;
}

#session-detail-view .tab-btn:focus-visible {
  outline: 3px solid #4f46e5;       /* strong keyboard focus ring */
  outline-offset: 2px;
}

#session-detail-view .tab-panel { display:none; }
#session-detail-view .tab-panel.active { display:block; }

.pager { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:10px; }
.pager.hidden { display:none; }
.pager .btn {
  border: 1px solid #d1d5db;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.pager .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.pager .info { font-size: 14px; color: #374151; }


/* Keep the button tidy */
#createCustomModelBtn2.create-custommodel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}


/* Header row for Saved Models */
.mm-list-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:16px;        /* not tight to the big page header */
  margin-bottom:10px;
  padding-bottom:8px;
  border-bottom:1px solid #e6eaef;
}

/* Saved Models list — clean, table-like rows */
.saved-list{
  list-style:none;
  margin:0;
  padding:0;
  border:1px solid #e6eaef;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
}

.saved-item{
  padding:12px 14px;
  border-top:1px solid #eef2f6;
}
.saved-item:first-child{ border-top:0; }

/* Layout the line with name on left, actions on right */
.saved-item .model-details{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* Inline edit form area */
.model-edit{
  display:none;               /* shown by your toggle JS */
  padding:12px 14px;
  background:#fafbfd;
  border-top:1px dashed #e1e6ef;
}

/* Pager spacing */
.pager{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:12px;
}
.pager button[disabled]{ opacity:.5; cursor:not-allowed; }


.doc-list { margin-top: 8px; display: grid; gap: 10px; }
.doc-item { border: 1px solid #e2e2e7; border-radius: 8px; padding: 10px; }
.doc-head { display: flex; gap: 8px; align-items: center; }
.badge { background: #eef5ff; color: #2b6cb0; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge-warn { background: #fff5f5; color: #c53030; }
.doc-meta { font-size: 12px; color: #666; display: flex; gap: 12px; margin: 4px 0 6px; }
.doc-actions button { margin-right: 8px; }
.doc-advice { font-size: 12px; color: #8a4b00; background: #fff8e1; padding: 4px 6px; border-radius: 6px; }


/* --- Rich code block styling for code --- */
.code-block {
  margin: 12px 0;
}
.code-block pre { padding-top: 18px; }

.code-block pre {
  background: #0b1020;        /* deep dark background */
  color: #e6e6e6;             /* soft light text */
  border-radius: 10px;
  padding: 14px 16px;
  overflow: auto;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
}

.code-block pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.90rem;
  line-height: .7;
  white-space: pre;           /* important: don't wrap or collapse spaces */
  tab-size: 4;
  display: block;
  overflow-x: auto;
}

/* Inline code look (not the big block) */
code {
  background: #f5f7fb;
  color: #111;
  border: 1px solid #e5e7eb;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}


/* sessions modal: allow scrolling for long content */
.modal {
  max-height: 85vh;           /* cap overall popup height */
  overflow: hidden;           /* keep header visible while body scrolls */
  display: flex;
  flex-direction: column;
}

.ai-block {
  max-height: 70vh;           /* scroll only the body */
  overflow: auto;             /* 👈 enables scroll */
  white-space: pre-wrap;      /* keep your existing wrapping */
}

/* nicer code in the popup too */
.ai-block pre {
  background: #f9f9f9;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
}



/* =========================================================
   SKILFY LIGHT THEME – POST LOGIN UI NORMALIZATION
   (User + Sponsor pages using styles.css)
   ========================================================= */

:root {
  --sk-body: #f5f7fb;
  --sk-card: #ffffff;
  --sk-card-soft: #f9fafb;
  --sk-border: #e5e7eb;
  --sk-text: #111827;
  --sk-muted: #6b7280;
  --sk-accent: #6366f1;
  --sk-accent-soft: #eef2ff;
  --sk-danger: #ef4444;
}

/* === GLOBAL === */

body {
  background: var(--sk-body);
  color: var(--sk-text);
}

/* Remove any old dark backgrounds on wrappers */
.main-content,
.wrap {
  margin-left: 270px;
  padding: 20px 24px 28px;
  min-height: 100vh;
  background: linear-gradient(to bottom, #f5f7fb 0%, #edf1f9 35%, #f5f7fb 100%);
}

/* Responsive for smaller screens */
@media (max-width: 960px) {
  .main-content,
  .wrap {
    margin-left: 0;
    padding-top: 90px;
  }
}

/* === SIDEBAR – keep brand, but slightly softer === */

.sidebar {
  background: linear-gradient(180deg, #1f2933, #111827);
  color: #f9fafb;
  width: 250px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding: 18px 16px;
  box-shadow: 4px 0 30px rgba(15, 23, 42, 0.4);
}

.sidebar-logo h1 {
  font-size: 1.3rem;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 6px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.06s ease;
}

.nav-item .nav-text {
  margin-left: 8px;
}

.nav-item:hover {
  background: rgba(148, 163, 184, 0.25);
  transform: translateY(-1px);
}

.nav-item.active {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #f9fafb;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.45);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  right: -6px;
  width: 4px;
  height: 40%;
  border-radius: 999px;
  background: #a855f7;
}

/* === TOP HEADER (Interview Mode / Sessions / Prep / etc) === */

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 16px;
  background: var(--sk-card);
  border-radius: 18px;
  border: 1px solid var(--sk-border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.top-header h2,
#active-tab-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--sk-text);
}

.user-name {
  font-size: 0.9rem;
  color: var(--sk-muted);
}

/* Logout in a soft pill */
.logout-btn {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 999px;
  border: none;
  color: #f9fafb;
  padding: 7px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow 0.12s ease, transform 0.06s ease, background 0.12s ease;
}

.logout-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.25);
  transform: translateY(-1px);
}

/* === GENERIC CARD / TAB CONTAINER === */

.tab-section,
.prep-container,
.resume-container,
#analytics-charts,
#help-tab-content,
.sessions-wrapper,
.model-management-wrapper {
  background: var(--sk-card);
  border-radius: 18px;
  padding: 18px 20px 20px;
  border: 1px solid var(--sk-border);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

/* Extra spacing for sections with big lists / forms */
.prep-container,
.resume-container {
  margin-top: 8px;
}

/* === CHAT / INTERVIEW TAB === */

.chat-container {
  background: var(--sk-card);
  border-radius: 18px;
  border: 1px solid var(--sk-border);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: calc(100vh - 190px);
  max-height: 760px;
}

.chat-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.chat-controls select {
  flex: 1 1 180px;
  max-width: 280px;
}

/* Chat window itself */
.chat-window {
  flex: 1 1 auto;
  min-height: 220px;
  overflow-y: auto;
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--sk-card-soft);
  border: 1px solid var(--sk-border);
}

/* Messages */
.chat-message {
  padding: 9px 11px;
  border-radius: 14px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 90%;
  word-wrap: break-word;
}

.chat-message.user {
  margin-left: auto;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  color: #f9fafb;
}

.chat-message.assistant {
  background: #f3f4ff;
  border: 1px solid #e5e7ff;
  color: #111827;
}

/* Chat input strip */
.chat-input-area {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input-area .input-wrapper {
  flex: 1 1 auto;
  position: relative;
}

#inputField {
  width: 100%;
  min-height: 56px;
  max-height: 150px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--sk-border);
  background: #ffffff;
  color: var(--sk-text);
  font-size: 14px;
  resize: vertical;
}

/* Speech preview bubble – above input */
#speechPreview,
#speechPreviewFull {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  max-width: 440px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #111827;
  color: #e5e7eb;
  font-size: 13px;
  display: none;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(31, 41, 55, 0.9);
  z-index: 20;
}

#speechPreview.active,
#speechPreviewFull.active {
  display: block !important;
}

/* Mic & Send buttons – circular, aligned */
#micButton,
#sendButton,
#micButtonFull,
#sendButtonFull {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #f9fafb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.06s ease, box-shadow 0.12s ease, background 0.12s ease;
}

#micButton:hover,
#sendButton:hover,
#micButtonFull:hover,
#sendButtonFull:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

/* Suggested questions list above textarea */
.suggestions {
  background: #f3f4ff;
  border-radius: 12px;
  border: 1px solid #e5e7ff;
  padding: 8px 10px;
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 4px;
}

/* === FULLSCREEN CHAT MODE (light) === */

.fullscreen-chat .main-content {
  margin-left: 0;
  padding: 10px 14px 18px;
}

.fullscreen-chat .chat-container {
  width: 100%;
  height: calc(100vh - 40px);
  border-radius: 24px;
}

.fullscreen-chat .chat-window {
  padding-top: 60px;
  padding-bottom: 110px;
}

/* Input bar sticks to bottom */
.fullscreen-chat .chat-input-area {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 12px;
  margin-top: 0;
}

/* === INTERVIEW SESSIONS TABLE === */

.sessions-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: #ffffff;
}

.sessions-table th,
.sessions-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.sessions-table thead th {
  background: #f9fafb;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #6b7280;
}

.sessions-table tr:hover {
  background: #f3f4ff;
}

.view-details-btn {
  background: #4b5563;
  color: #ffffff;
  border-radius: 999px;
  padding: 6px 12px;
}

/* === PREP & MOCK INTERVIEW FORMS === */

.prep-form,
.resume-form {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.form-column {
  flex: 1;
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

/* Form elements (generic) */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  border-radius: 10px;
  border: 1px solid var(--sk-border);
  background: #ffffff;
  color: var(--sk-text);
  font-size: 14px;
  padding: 9px 11px;
  width: 100%;
  box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--sk-accent);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.6);
}

/* Primary buttons */
button,
.btn {
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #f9fafb;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.06s ease;
}

button:hover,
.btn:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}

/* === ANALYTICS TAB === */

#analytics-charts {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#score-trend-chart,
#question-type-chart {
  background: #0f172a;     /* dark canvas for readability */
  border-radius: 14px;
}

/* ensure labels not hidden by sidebar */
#analytics-charts canvas {
  padding: 8px;
}

/* === RESUME PREP === */

.resume-container {
  gap: 18px;
}

.resume-output {
  background: var(--sk-card-soft);
  border-radius: 14px;
  border: 1px solid var(--sk-border);
}

/* === HELP TAB === */

#help-tab-content {
  text-align: center;
}

#help-tab-content h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

#help-tab-content p {
  color: var(--sk-muted);
}

/* === PAGINATION (Sessions, etc.) === */

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.pager button {
  border-radius: 999px;
  padding: 6px 12px;
}




/* ================================
   PAYMENT SECTION INTERNAL TABS
   ================================ */

.payment-subnav {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.payment-subtab {
    background: #f3f4f6;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
    transition: 0.2s;
}

.payment-subtab:hover {
    background: #e5e7eb;
}

.payment-subtab.active {
    background: #2563eb;
    color: white;
}

/* Payment panes */

.payment-pane {
    display: none;
}

.payment-pane.active {
    display: block;
}

/* Cards */

.payment-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.payment-card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
}

/* Balance styling */

.balance-num {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.balance-sub {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Buy Credits */

.or-separator {
    text-align: center;
    margin: 12px 0;
    color: #9ca3af;
    font-size: 0.85rem;
}

.price-label {
    color: #4b5563;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.estimate-text {
    margin-top: 6px;
    color: #4b5563;
    font-size: 0.9rem;
}

/* Tables */

.payment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.9rem;
}

.payment-table th {
    background: #f3f4f6;
    padding: 10px;
    font-weight: 600;
    text-align: left;
}

.payment-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.empty-row {
    text-align: center;
    color: #9ca3af;
}

/* Buttons */

.small {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
}

.full-width {
    width: 100%;
}


.payment-card h4 {
  margin-bottom: 8px;
}

.balance-value {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.payment-history-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.payment-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.payment-table th,
.payment-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 0.9rem;
}

.payment-table th {
  background: #f8fafc;
  font-weight: 600;
}

.empty-row {
  text-align: center;
  color: #6b7280;
}

.link-btn {
  border: none;
  background: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.inline-form .form-row {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

#payment-custom-hours {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    margin-bottom: 8px;
}

/* Payment grid clean 2-card layout */
.payment-grid.single-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

/* Combined balance + features card */
.balance-features-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.balance-wrapper {
    margin-bottom: 10px;
}

.divider {
    border: none;
    height: 1px;
    background: #e5e7eb;
    margin: 12px 0;
}

.feat-title {
    margin-bottom: 10px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: 0.2s;
}

.feature-item:hover {
    background: #eef2f7;
}

.feat-icon {
    font-size: 1.2rem;
}

.feat-text {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

.secured-msg {
    margin-top: 6px;
    font-size: 0.68rem !important; /* VERY small */
    text-align: center;
    color: #9ca3af !important;     /* lighter grey */
    opacity: 0.8;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.secured-msg::before {
    content: "🔒";
    font-size: 0.8rem;
}

.empty-state-box {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.empty-state-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.empty-state-box {
    padding: 35px 10px;
    text-align: center;
}

.empty-state-title {
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
}

.empty-state-btn {
    background: #2563eb;
    padding: 8px 16px;
    color: #fff;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.empty-card {
    text-align: center;
}

.empty-state-wrapper {
    padding: 50px 20px;
    text-align: center;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #374151;
}

.empty-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 6px auto 18px auto;
    max-width: 300px;
}

.empty-state-btn {
    background: #2563eb;
    padding: 10px 18px;
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.empty-state-btn:hover {
    background: #1d4ed8;
}


/* Restore numbering in ChatGPT-style messages */
.chat-window ol,
.chat-window ul {
    margin-left: 1.4rem !important;
    list-style: revert !important;
}

/* Restore code block visibility */
.chat-window pre,
.chat-window code {
    background: #111827 !important;
    color: #ffffff !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    white-space: pre-wrap !important;
    overflow-x: auto !important;
}

/* Prevent text overlap */
.chat-window * {
    position: relative;
    z-index: initial;
}

.chat-window code,
.chat-window pre,
code,
pre {
    display: block !important;
    position: relative !important;
    z-index: 1 !important;

    background: #1e1e1e !important;
    color: #ffffff !important;

    padding: 12px 16px !important;
    margin: 10px 0 !important;
    border-radius: 8px !important;

    white-space: pre-wrap !important;
    overflow-x: auto !important;
    font-family: "Fira Code", monospace !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}

/* Inline code fix */
.chat-window p code,
p code,
li code {
    display: inline !important;
    padding: 2px 6px !important;
    background: #2d2d2d !important;
    border-radius: 4px !important;
}

/* Fix list numbers being hidden */
.chat-window ol,
.chat-window ul {
    list-style: revert !important;
    margin-left: 1.5rem !important;
}

/* Ensure parent container doesn’t clip code blocks */
.chat-window * {
    overflow: visible !important;
}

/* Remove weird empty characters at start/end of code blocks */
.chat-window pre,
pre {
    font-variant-ligatures: none !important;
}

.chat-window pre::before,
.chat-window pre::after,
.chat-window code::before,
.chat-window code::after {
    content: "" !important;   /* remove phantom characters */
    display: none !important;
}

/* Prevent browsers from rendering control characters */
.chat-window pre,
.chat-window code {
    unicode-bidi: plaintext !important;
}

/* Prevent browsers from rendering invisible whitespace as glyphs */
pre, code {
    font-family: "Fira Code", Consolas, monospace !important;
    line-height: 1.45 !important;
    unicode-bidi: isolate !important; /* isolates direction and removes control glyphs */
}

/* Remove the phantom character boxes at beginning/end */
pre::before,
pre::after,
code::before,
code::after {
    content: none !important;
}

/* Prevent first and last whitespace from becoming renderable boxes */
pre, code {
    white-space: pre-wrap !important;
    overflow-x: auto !important;
    -webkit-font-smoothing: antialiased !important;
}

/* Extra safety: strip glyph boxes visually without removing content */
pre, code {
    text-rendering: optimizeLegibility !important;
}
