/*--------------------------------------------------------------
# GLOBAL STYLES
--------------------------------------------------------------*/
body {
    font-family: 'Söhne', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: #ffffff;
    overflow: hidden; /* prevent the body from scrolling */
    font-size: 18px; /* Increased from 16px */
    color: #374151;
}

/* Divider line for various sections */
.divider {
    border: 0;
    height: 1px;
    background-color: #e5e7eb;
    margin: 5px 0;
}

/*--------------------------------------------------------------
# HEADER STYLES
--------------------------------------------------------------*/
.header {
    width: 100%;
    text-align: center;
    padding: 18px; /* Increased from 16px */
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 18px; /* Increased from 16px */
    box-sizing: border-box;
    position: relative;
}

/* App title and favicon */
.app-title {
    font-size: 28px; /* Increased from 24px */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #10a37f;
    font-weight: 600;
}

.app-title .favicon {
    width: 1.5em;
    height: 1.5em;
    margin-right: 12px; /* Increased from 10px */
}

/* Selection controls row */
.selection-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 18px; /* Increased from 16px */
    margin-top: 18px; /* Increased from 16px */
}

.selection-row label {
    font-size: 16px; /* Increased from 14px */
    margin-right: 6px; /* Increased from 5px */
    color: #6b7280;
}

.selection-row input,
.selection-row select {
    padding: 10px 14px; /* Increased from 8px 12px */
    font-size: 16px; /* Increased from 14px */
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    width: auto;
    min-width: 170px; /* Increased from 150px */
    background-color: #f9fafb;
}

.selection-row input:focus,
.selection-row select:focus {
    outline: none;
    border-color: #10a37f;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2);
}

/* Info icons and tooltips */
.info-icon {
    display: inline-block;
    width: 18px; /* Increased from 16px */
    height: 18px; /* Increased from 16px */
    background-color: #10a37f;
    color: white;
    text-align: center;
    border-radius: 50%;
    font-size: 14px; /* Increased from 12px */
    line-height: 18px; /* Increased from 16px */
    cursor: pointer;
    margin-right: 6px; /* Increased from 5px */
    position: relative;
}

.info-icon:hover .tooltip {
    display: block;
}

.tooltip {
    display: none;
    position: absolute;
    background-color: #374151;
    color: #fff;
    padding: 10px 14px; /* Increased from 8px 12px */
    border-radius: 6px;
    font-size: 14px; /* Increased from 12px */
    width: 240px; /* Increased from 200px */
    top: 26px; /* Increased from 24px */
    left: 0;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/*--------------------------------------------------------------
# AUTHENTICATION AREA
--------------------------------------------------------------*/
.auth-area {
    position: absolute;
    top: 18px; /* Increased from 16px */
    right: 18px; /* Increased from 16px */
    display: flex;
    align-items: center;
    gap: 14px; /* Increased from 12px */
}

/* User info display */
#user-info {
    display: flex;
    align-items: center;
    gap: 12px; /* Increased from 10px */
}

.user-email {
    font-size: 16px; /* Increased from 14px */
    color: #6b7280;
    margin-right: 12px; /* Increased from 10px */
}

/* Button styling */
.signin-btn {
    background-color: #10a37f;
    color: white;
    border: none;
    padding: 10px 18px; /* Increased from 8px 16px */
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px; /* Increased from 14px */
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.signin-btn:hover {
    background-color: #0e8e6d;
}

/* Logout button styling */
#logout-btn {
    background-color: #ef4444;
}

#logout-btn:hover {
    background-color: #dc2626;
}

/*--------------------------------------------------------------
# BUTTON GROUP & MODE TOGGLE BUTTON
--------------------------------------------------------------*/
.button-group {
    display: flex;
    gap: 12px;
    z-index: 10;
}

.mode-toggle-btn {
    padding: 12px 18px; /* Increased from 10px 16px */
    font-size: 16px; /* Increased from 14px */
    font-weight: 500;
    cursor: pointer;
    background-color: #10a37f;
    color: white;
    border: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.mode-toggle-btn:hover {
    background-color: #0e8e6d;
}

.feedback-btn {
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    background-color: #10a37f;
    color: white;
    border: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.feedback-btn:hover {
    background-color: #0e8e6d;
}

/*--------------------------------------------------------------
# MAIN CONTAINER
--------------------------------------------------------------*/
.container {
    width: 100%;
    max-width: 1200px;
    height: calc(100vh - 70px); /* Increased from 60px */
    display: flex;
    justify-content: space-between;
    padding: 18px; /* Increased from 16px */
    box-sizing: border-box;
    overflow: hidden; /* prevent scrolling inside the container */
}

.content {
    display: flex; /* flex container for side-by-side layout */
    width: 100%; /* full width */
    height: 100%; /* full height */
    justify-content: space-between; /* space between sections */
}

/*--------------------------------------------------------------
# TEXT MODE STYLES
--------------------------------------------------------------*/
.part-c {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Chat Screen */
.chat-screen {
    flex-grow: 1;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chat-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 35px; /* Increased from 30px */
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 0; /* Increased from 8px 0 */
}

.chat-controls h2 {
    font-size: 22px; /* Increased from 18px */
    font-weight: 600;
    color: #374151;
    text-align: center;
    padding: 6px 12px; /* Increased from 5px 10px */
    margin: 0;
    line-height: 1.2;
}

.chat-content {
    flex-grow: 1;
    padding: 18px; /* Increased from 16px */
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 2px !important;
}

/* Message Input Area */
.message-input-container {
    display: flex;
    align-items: center;
    position: relative;
    margin-top: 18px; /* Increased from 16px */
    margin-bottom: 22px; /* Increased from 20px */
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 14px; /* Increased from 8px 12px */
    width: 100%;
    max-width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.message-input-container .autosize {
    width: 100%;
    min-height: 130px; /* Increased from 120px */
    max-height: 130px; /* Increased from 120px */
    resize: none;
    overflow-y: auto;
    padding: 14px; /* Increased from 12px */
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
    font-family: 'Söhne', 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px; /* Increased from 16px */
    color: #374151;
}

.message-input-container .autosize:focus {
    outline: none;
    border-color: #10a37f;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2);
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px; /* Increased from 20px */
    color: #6b7280;
    margin: 0 9px; /* Increased from 0 8px */
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.icon-button:hover {
    color: #10a37f;
}

.message-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 9px; /* Increased from 8px */
    font-size: 18px; /* Increased from 16px */
    border-radius: 6px;
    margin: 0 9px; /* Increased from 0 8px */
    font-family: 'Söhne', 'Helvetica Neue', Arial, sans-serif;
}

/* Chat Message Styling */
#AIResponses {
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

.message-container {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    width: 100% !important;
}

/* User message styling */
.user-message {
    justify-content: flex-start !important;
    width: 75% !important;
    margin-right: auto !important;
    margin-left: 0 !important;
}

.user-message .message-text {
    background-color: #f7f7f8;
    color: #374151;
    padding: 8px 10px !important;
    margin: 0 !important;
    border-radius: 12px;
    border-top-left-radius: 4px;
    text-align: left;
    word-wrap: break-word;
    line-height: 1.3 !important;
    font-size: 18px; /* Increased from 16px */
    width: auto !important;
}

/* AI message styling */
.ai-message {
    justify-content: flex-end !important;
    width: 75% !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}

.ai-message .message-text {
    background-color: #efefef;
    color: #374151;
    padding: 8px 10px !important;
    margin: 0 !important;
    border-radius: 12px;
    border-top-right-radius: 4px;
    text-align: left;
    word-wrap: break-word;
    line-height: 1.3 !important;
    font-size: 18px; /* Increased from 16px */
    width: auto !important;
}

/* Remove margins from paragraphs inside messages */
.message-text p {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
}
.message-text p:last-child {
    margin-bottom: 0 !important;
}

/* Add a very small separator between messages for clarity */
.message-container + .message-container {
    margin-top: 2px !important;
}

/* Loading indicator - consistent styling for both modes */
.loading-indicator {
    text-align: center;
    margin: 10px 0;
    padding: 10px;
    flex-shrink: 0;
    height: 50px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    display: none; /* Hidden by default, shown via JavaScript */
}

.loading-indicator p {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #6b7280;
}

.loading-indicator img {
    width: 30px;
    height: 30px;
}

/* Placeholder div to maintain symmetry with loading indicator */
.transcription-placeholder {
    height: 50px; /* Match loading indicator height */
    visibility: hidden; /* Hide but preserve space */
    flex-shrink: 0;
}

/*--------------------------------------------------------------
# AUDIO MODE STYLES 
--------------------------------------------------------------*/
/* Transcription Area (Left Side) */
.part-a {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-right: 22px; /* Increased from 20px */
    height: 100%;
}

/* Response Area (Right Side) */
.part-b {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-right: 22px; /* Increased from 20px */
    height: 100%;
}

/* Common styling for both screens */
.transcription-screen,
.response-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Common styling for the control sections */
.transcription-controls,
.response-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 35px;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 0;
    flex-shrink: 0;
    height: 60px; /* Set exact height for perfect symmetry */
}

/* Common styling for headings */
.transcription-controls h2,
.response-controls h2 {
    font-size: 22px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    line-height: 1.2;
}

/* Common styling for content areas */
.transcription-content,
.response-content {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background-color: #ffffff;
    font-size: 18px;
    line-height: 1.5;
}

/* Common footer styling for both screens */
.upload-resume-container,
.pagination-buttons {
    position: static;
    width: 100%;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    flex-shrink: 0;
    height: 54px; /* Set exact height for perfect symmetry */
    box-sizing: border-box;
}

/* Button styling to match across both screens */
.upload-resume-btn,
.nav-button {
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    background-color: #10a37f;
    color: white;
    border: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s ease;
    min-width: 100px; /* Ensure buttons have similar width */
    justify-content: center;
}

/* Button hover state */
.upload-resume-btn:hover:not(:disabled),
.nav-button:hover:not(:disabled) {
    background-color: #0e8e6d;
}

/* Disabled button state */
.upload-resume-btn:disabled,
.nav-button:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
    color: #9ca3af;
}

/* Make the upload button container match the pagination layout */
.upload-resume-container {
    justify-content: space-between;
    padding-left: 20px;
    padding-right: 20px;
}

/* Create a balanced upload button layout with a hidden placeholder */
.upload-resume-container::before,
.upload-resume-container::after {
    content: "";
    width: 100px; /* Match button width */
    display: block;
}

/* Set explicit width for the upload button to center it properly */
.upload-resume-btn {
    flex: 0 0 auto;
}

/* Center the text and icons in the nav buttons */
.nav-button i {
    margin: 0 5px;
}

/* Recording Buttons */
.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 110px; /* Increased from 100px */
}

.button-text {
    font-size: 16px; /* Increased from 14px */
    color: #6b7280;
    margin-top: 6px; /* Increased from 5px */
    text-align: center;
    width: 100%;
}

/* Adjust button text positions */
#startBtnText {
    margin-left: -55px; /* Increased from -50px */
}

#stopBtnText {
    margin-right: -55px; /* Increased from -50px */
}

.start-button {
    width: 28px; /* Increased from 25px */
    height: 28px; /* Increased from 25px */
    background-color: #ef4444;
    border-radius: 50%;
    border: none;
    margin-right: 55px; /* Increased from 50px */
    cursor: pointer;
    transition: transform 0.2s ease;
}

.start-button:hover {
    transform: scale(1.1);
}

.stop-button {
    width: 28px; /* Increased from 25px */
    height: 28px; /* Increased from 25px */
    background-color: #111827;
    margin-left: 55px; /* Increased from 50px */
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.stop-button:hover {
    transform: scale(1.1);
}

/* Title icons */
.title-icon {
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    margin-left: 12px; /* Increased from 10px */
}

/*--------------------------------------------------------------
# SIDEBAR STYLES
--------------------------------------------------------------*/
.sidebar {
    width: 0;
    height: 100%;
    background-color: #202123;
    position: fixed;
    top: 0;
    left: 0;
    overflow-x: hidden;
    transition: 0.3s;
    padding-top: 22px; /* Increased from 20px */
    z-index: 1200;
    color: #ffffff;
}

.sidebar.active {
    width: 360px;
}

.sidebar-content {
    padding: 18px; /* Increased from 16px */
    color: #ffffff;
}

.sidebar h2 {
    color: #ffffff;
    margin-bottom: 22px; /* Increased from 20px */
    font-size: 20px; /* Increased from 18px */
    font-weight: 600;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    padding: 12px; /* Increased from 10px */
    background-color: #2a2b32;
    margin-bottom: 12px; /* Increased from 10px */
    border-radius: 6px;
    cursor: pointer;
    color: #ffffff;
    position: relative;
    transition: background-color 0.2s ease;
}

.sidebar ul li:hover {
    background-color: #343541;
}

/* Series Container */
.series-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px; /* Increased from 8px */
    cursor: pointer;
}

.arrow {
    font-size: 18px; /* Increased from 16px */
    margin-right: 12px; /* Increased from 10px */
    cursor: pointer;
}

.series-title {
    white-space: normal;
    word-break: break-word;
    flex-grow: 1;
    font-size: 16px; /* Increased from 14px */
}

/* Plus Button */
.plus-btn {
    background-color: #10a37f;
    color: white;
    border: none;
    padding: 6px 12px; /* Increased from 5px 10px */
    font-size: 16px; /* Increased from 14px */
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.plus-btn:hover {
    background-color: #0e8e6d;
}

/* Nested Lists */
.sidebar ul li ul {
    margin-left: 22px; /* Increased from 20px */
    list-style-type: none;
}

.sidebar ul li ul li ul {
    margin-left: 22px; /* Increased from 20px */
    list-style-type: none;
}

.sidebar ul li ul li ul li {
    padding: 9px 12px; /* Increased from 8px 10px */
    margin-bottom: 6px; /* Increased from 5px */
    background-color: #343541;
    border-radius: 4px;
    cursor: pointer;
    color: #ececf1;
    transition: background-color 0.2s ease;
}

.sidebar ul li ul li ul li:hover {
    background-color: #444654;
}

/* File links */
.sidebar ul li ul li ul li a {
    text-decoration: none;
    color: inherit;
}

.sidebar ul li ul li ul li a:hover {
    text-decoration: underline;
}

.file-arrow {
    font-size: 18px; /* Increased from 16px */
    margin-right: 12px; /* Increased from 10px */
    cursor: pointer;
}

/* Toggle Button */
.sidebar-toggle {
    background-color: #202123;
    color: white;
    border: none;
    padding: 12px 17px; /* Increased from 10px 15px */
    cursor: pointer;
    font-size: 22px; /* Increased from 20px */
    position: fixed;
    top: 12px; /* Increased from 10px */
    left: 12px; /* Increased from 10px */
    z-index: 1200;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: #343541;
}

/* Meeting Items */
.meeting-item {
    background-color: #343541;
    color: #ececf1;
    padding: 12px; /* Increased from 10px */
    margin-bottom: 6px; /* Increased from 5px */
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 16px; /* Increased from 14px */
}

.meeting-item.active {
    background-color: #10a37f;
    color: white;
    border-radius: 6px;
    padding: 14px; /* Increased from 12px */
    transition: background-color 0.2s ease;
}

.meeting-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px; /* Increased from 8px */
}

.meeting-name {
    font-size: 16px; /* Increased from 14px */
    white-space: normal;
    word-break: break-word;
    flex-grow: 1;
}

/* Delete Button */
.delete-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 6px 9px; /* Increased from 5px 8px */
    font-size: 16px; /* Increased from 14px */
    border-radius: 4px;
    cursor: pointer;
    margin-left: 12px; /* Increased from 10px */
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.delete-btn:hover {
    background-color: #dc2626;
}

/* Download Link */
.download-link {
    font-size: 14px; /* Increased from 12px */
    color: #10a37f;
}

/*--------------------------------------------------------------
# INSTRUCTION STYLES
--------------------------------------------------------------*/
.instruction-list {
    margin: 22px 0; /* Increased from 20px 0 */
    padding-left: 35px; /* Increased from 30px */
    list-style-type: disc;
    font-size: 18px; /* Increased from 16px */
    line-height: 1.6;
    color: #374151;
}

.instruction-list ul {
    list-style-type: circle;
    margin: 16px 0; /* Increased from 15px 0 */
    padding-left: 35px; /* Increased from 30px */
}

/* Instruction and Credit Usage Windows */
.instruction-window,
.credit-usage-window {
    position: fixed;
    top: 20%;
    width: 300px; /* Increased from 280px */
    height: auto;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    border-radius: 12px;
}

/* Credit Usage Window */
.credit-usage-window {
    left: 0;
}

.credit-usage-window.folded {
    transform: translateX(-100%);
}

.sidebar.active + .credit-usage-window {
    display: none;
}

/* User Instructions Window */
.instruction-window {
    right: 0;
    width: 320px; /* Increased from 280px */
    max-height: 70vh;
    overflow-y: auto;
    overflow: visible;
}

.instruction-window.folded {
    transform: translateX(100%);
}

/* Style links in the instruction panel */
.instruction-list a {
    color: #10a37f;
    text-decoration: none;
}

.instruction-list a:hover {
    text-decoration: underline;
}

.instruction-window h4,
.credit-usage-window h4 {
    margin-top: 0;
    font-size: 18px; /* Increased from 16px */
    font-weight: 600;
    color: #10a37f;
}

.instruction-window ul {
    list-style-type: disc;
    padding-left: 22px; /* Increased from 20px */
    color: #374151;
}

.instruction-window ul li {
    margin-bottom: 12px; /* Increased from 10px */
    font-size: 16px; /* Increased from 14px */
    line-height: 1.5;
}

.panel-content {
    padding: 18px; /* Increased from 16px */
}

/* Toggle Buttons */
.horizontal-toggle-btn {
    position: absolute;
    top: 50%;
    width: 34px; /* Increased from 30px */
    height: 55px; /* Increased from 50px */
    background-color: #10a37f;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px; /* Increased from 16px */
    line-height: 55px; /* Increased from 50px */
    text-align: center;
    transition: all 0.3s ease-in-out;
}

.horizontal-toggle-btn.right {
    right: -34px; /* Increased from -30px */
    border-radius: 0 6px 6px 0;
}

.horizontal-toggle-btn.left {
    left: -34px; /* Increased from -30px */
    border-radius: 6px 0 0 6px;
}

.credit-usage-window.folded .horizontal-toggle-btn.right {
    transform: rotate(180deg);
}

.instruction-window.folded .horizontal-toggle-btn.left {
    transform: rotate(180deg);
}

.horizontal-toggle-btn:hover {
    background-color: #0e8e6d;
}

/*--------------------------------------------------------------
# BUTTON STATES
--------------------------------------------------------------*/
button:disabled {
    background-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    border: 1px solid #d1d5db;
    pointer-events: none;
}