/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
/* Styles for loading indicator and confirmation message */
#autofill-loading {
    display: flex;
    align-items: center;
    color: #555;
.course-suggestion {
    background: #f0f0f0;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.event-card {
    border: 1px solid #ccc;
    padding: 0;
}

.course-suggestion li {
    margin-bottom: 5px;
}

.course-suggestion a {
    color: #3498db;
    text-decoration: none;
}

.course-suggestion a:hover {
    text-decoration: underline;
}
}

.cv-analysis {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    border: 1px solid #eee;
    text-align: left;
}

.cv-analysis h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #34495e;
    text-align: center;
}

.analysis-breakdown {
    padding: 25px;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.analysis-breakdown p {
    margin-bottom: 15px;
    font-size: 15px;
    color: #4a5568;
    line-height: 1.5;
}

.analysis-breakdown p strong {
    font-weight: 600;
    color: #2d3748;
}

.criteria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.criteria p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.cv-analysis {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.cv-analysis h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.analysis-criteria {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
}

.analysis-criteria h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #555;
}

.analysis-criteria p {
    font-size: 14px;
    color: #777;
    margin: 5px 0;
}

.analysis-section {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.analysis-section h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.analysis-section .result-box {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.analysis-section h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #3498db;
}

.analysis-section p {
    font-size: 12px;
    color: #555;
}

#autofill-loading i {
    margin-right: 5px;
}

#autofill-status {
    display: flex;
    align-items: center;
    color: green;
}

#autofill-status i {
    margin-right: 5px;
}
}

.editor-preview-slide .preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001; /* Ensure it's above other elements */
}

/* Base Layout */
body {
    font-family: Arial, sans-serif;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 18vw;
    min-width: 70px;
    max-width: 300px;
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    height: 100vh;
    position: fixed;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.logo {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

/* Toggle Button */
.toggle-btn {
    position: absolute;
    top: 20px;
    right: -15px;
    background: #34495e;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    z-index: 100;
}

/* Navigation Links */
.nav-links {
    list-style: none;
    padding: 20px 0;
}

.nav-links li {
    padding: 15px 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-links li:hover {
    background-color: #34495e;
}

.nav-links li i {
    margin-right: 10px;
    width: 20px;
}

.sidebar.collapsed .logo h2,
.sidebar.collapsed .nav-links li span {
    display: none;
}

.sidebar.collapsed .logo {
    display: none;
}

/* Main Content Area */
.main-content {
    margin-left: 18vw;
    padding: 20px;
    flex-grow: 1;
    background-color: #f5f6fa;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 70px;
}

.welcome-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* CV Section Specific Styles */
.cv-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.input-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.text-area {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 10px 0;
    font-family: Arial, sans-serif;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.text-area:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.analysis-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.skills-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* Common Button Style */
.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

/* File Upload and Next Button Styles */
.upload-area {
    border: 2px dashed #3498db;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin: 15px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-area:hover {
    background-color: #f7f9fc;
}

.file-input {
    display: none;
}

.uploaded-file {
    margin: 10px 0;
    padding: 10px;
    background: #f7f9fc;
    border-radius: 5px;
    display: none;
}

.next-button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    transition: all 0.3s ease;
    display: block; /* Changed from 'none' to always show */
}

.next-button.disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.7;
}

.next-button:not(.disabled):hover {
    background: #219a52;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Generate View Styles */
.generate-view {
    display: none;
}

.generate-view.active {
    display: block;
}

.upload-view.hidden {
    display: none;
}

.back-btn {
    background: #34495e;
    margin-bottom: 20px;
}

.document-preview {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.preview-content {
    min-height: 300px;
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 5px;
    background: #f9f9f9;
}

.score-container {
    text-align: center;
    margin: 20px 0;
}

.score {
    font-size: 48px;
    color: #27ae60;
    font-weight: bold;
    margin: 10px 0;
}

/* CV Editor Styles */
.editor-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.editor-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    display: grid;
    gap: 15px;
    margin: 15px 0;
}

.form-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

.experience-entry {
    border: 1px solid #eee;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    position: relative;
}

.btn-add {
    background: #27ae60;
}

.btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    padding: 5px 10px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary {
    background: #3498db;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cv-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar .logo {
        font-size: 12px;
    }

    .nav-links li span {
        display: none;
    }

    .main-content {
        margin-left: 70px;
    }
}

@media (max-width: 1200px) {
    .sidebar {
        width: 22vw;
        max-width: 220px;
    }
    .main-content {
        margin-left: 22vw;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 70px;
    }
    .main-content {
        margin-left: 70px;
    }
    .features-grid, .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .sidebar {
        position: absolute;
        width: 100vw;
        left: 0;
        top: 0;
        height: auto;
        z-index: 1000;
    }
    .main-content {
        margin-left: 0;
        padding: 10px;
    }
    .features-grid, .skills-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .feature-card, .event-card {
        padding: 10px;
    }
}

/* CV Editor Page Styles */
.editor-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    min-height: calc(100vh - 40px);
    margin: 0 auto;
}

.cv-page {
    max-width: 210mm;
    min-height: 297mm;
    background: white;
    margin: 0 auto;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    width: 100%;
}

.cv-header {
    text-align: center;
    margin-bottom: 30px;
}

.cv-header .name {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.cv-header .contact-info {
    font-size: 12px;
    color: #666;
}

.cv-section {
    margin: 25px 0;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    cursor: move;
}

.cv-section.dragging {
    opacity: 0.5;
    background: #f8f9fa;
    border: 2px dashed #3498db;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.add-item-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    transition: color 0.3s;
}

.add-item-btn:hover {
    color: #2980b9;
}

.cv-input {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
}

.cv-input:focus {
    border-color: #3498db;
    outline: none;
}

.cv-input::placeholder {
    color: #95a5a6;
}

.entry-item {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    position: relative;
}

.bullet-points {
    margin: 10px 0;
    padding-left: 20px;
}

.bullet-point {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
}

.bullet-point input {
    flex-grow: 1;
}

.remove-bullet {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 2px;
}

.bullet-point:hover .remove-bullet {
    opacity: 1;
}

.add-bullet {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 12px;
    padding: 5px 0;
    margin-top: 5px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.add-bullet:hover {
    color: #2980b9;
}

.bullet-point::before {
    content: "•";
    margin-right: 10px;
}

.date-range {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.skill-tag {
    background: #f0f2f5;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.remove-btn {
    font-size: 12px;
    color: #e74c3c;
    cursor: pointer;
}

.page-container {
    max-width: 210mm; /* A4 width */
    min-height: 297mm; /* A4 height */
    background: white;
    margin: 40px auto;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.editor-page {
    max-width: 800px;
    width: 90%;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.section-title {
    color: #2c3e50;
    font-size: 20px;
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.contact-info {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* Professional CV Editor Styles */
.cv-page {
    max-width: 210mm;
    min-height: 297mm;
    background: white;
    margin: 40px auto;
    padding: 30px 40px;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.header-name {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
    color: #2c3e50;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 10px 0;
    border-top: 1px solid #3498db;
    border-bottom: 1px solid #3498db;
    padding: 8px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.contact-item i {
    color: #3498db;
    width: 15px;
    font-size: 12px;
}

.contact-item .cv-input {
    font-size: 12px;
    padding: 4px 8px;
}

.cv-section {
    margin: 15px 0;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    cursor: move;
}

.cv-section.dragging {
    opacity: 0.5;
    background: #f8f9fa;
    border: 2px dashed #3498db;
}

.section-header {
    margin-bottom: 8px;
}

.section-title {
    font-size: 16px;
    padding-left: 10px;
    margin-bottom: 5px;
}

.section-title::before {
    width: 3px;
    height: 90%;
}

.summary-input {
    font-size: 11px;
    line-height: 1.3;
    height: auto;
    min-height: 40px;
    padding: 5px;
    resize: none;
    white-space: pre-wrap;
}

.entry-item {
    margin: 8px 0;
    padding: 10px;
    position: relative;
}

.bullet-points {
    margin: 5px 0;
    padding-left: 15px;
}

.bullet-point {
    margin: 3px 0;
}

.bullet-point .cv-input {
    font-size: 13px;
    padding: 4px 8px;
}

.date-range {
    gap: 5px;
    font-size: 11px;
    margin: 5px 0;
}

.date-range .cv-input {
    font-size: 11px;
    padding: 4px 8px;
}

.skills-grid {
    gap: 15px;
    margin-top: 10px;
}

.category-title {
    font-size: 14px;
    margin-bottom: 8px;
}

.skill-tag {
    font-size: 11px;
    padding: 3px 8px;
    margin: 2px;
}

.action-buttons {
    margin: 20px 0;
}

/* Compact spacing for experience entries */
.experience-entry input[type="text"] {
    margin: 3px 0;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 2px 6px;
    border-radius: 3px;
}

.entry-item:hover .remove-btn {
    opacity: 1;
}

.remove-btn:hover {
    background: #e74c3c;
    color: white;
}

/* Make inputs more compact */
.cv-input {
    padding: 6px 8px;
    margin: 3px 0;
}

/* Adjust section margins */
.skills-container {
    gap: 5px;
    margin-top: 5px;
}

/* Update existing styles */
.cv-input {
    padding: 10px 12px;
    border: 1px solid transparent;
    background: #f8f9fa;
    transition: all 0.3s;
}

.cv-input:focus {
    background: white;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.skill-tag {
    background: #f1f8ff;
    border: 1px solid #cce5ff;
    color: #3498db;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    transition: all 0.3s;
}

.skill-tag:hover {
    background: #e1f0ff;
}

/* Education and Projects Styles */
.entry-item input[type="text"]:first-child {
    font-weight: 600;
    color: #2c3e50;
}

.entry-item .bullet-point input[type="text"] {
    font-style: italic;
    color: #34495e;
}

.entry-item:hover {
    background: #f8f9fa;
    border-left: 2px solid #3498db;
}

/* Make sections more compact */
.cv-section:not(:last-child) {
    margin-bottom: 10px;
    padding-bottom: 10px;
}

/* Compact CV Styles */
.cv-page {
    max-width: 210mm;
    min-height: 297mm;
    background: white;
    margin: 20px auto;
    padding: 25px 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.cv-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3498db;
}

.header-name {
    font-size: 20px;
    margin-bottom: 5px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin: 5px 0;
    padding: 5px 0;
}

.contact-item {
    gap: 5px;
    font-size: 11px;
}

.contact-item i {
    width: 12px;
    font-size: 11px;
}

.cv-section {
    margin: 10px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    cursor: move;
}

.cv-section.dragging {
    opacity: 0.5;
    background: #f8f9fa;
    border: 2px dashed #3498db;
}

.section-header {
    margin-bottom: 5px;
}

.section-title {
    font-size: 14px;
    padding-left: 8px;
    margin-bottom: 3px;
}

.section-title::before {
    width: 2px;
}

.summary-input {
    font-size: 11px;
    line-height: 1.3;
    height: auto;
    min-height: 40px;
    padding: 5px;
    resize: none;
    overflow: hidden;
}

.entry-item {
    margin: 5px 0;
    padding: 8px;
    position: relative;
}

.bullet-points {
    margin: 3px 0;
    padding-left: 12px;
}

.bullet-point {
    margin: 2px 0;
}

.bullet-point input[type="text"] {
    font-size: 11px;
    padding: 3px 6px;
}

.date-range {
    font-size: 10px;
    margin: 2px 0;
}

.cv-input {
    padding: 4px 6px;
    margin: 2px 0;
    font-size: 11px;
}

.skills-grid {
    gap: 10px;
    margin-top: 5px;
}

.category-title {
    font-size: 12px;
    margin-bottom: 5px;
    color: #2c3e50;
}

.skill-tag {
    font-size: 10px;
    padding: 2px 6px;
    margin: 1px;
}

/* Compact spacing for entries */
.entry-item input[type="text"] {
    margin: 2px 0;
}

.remove-btn {
    font-size: 9px;
    padding: 1px 4px;
    top: 3px;
    right: 3px;
}

/* Update margins and paddings for better spacing */
.cv-section:not(:last-child) {
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.entry-item:hover {
    border-left-width: 1px;
}

/* Action buttons positioning */
.action-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Custom Section and Drag Styles */
.cv-section {
    cursor: move;
}

.cv-section.dragging {
    opacity: 0.5;
    background: #f8f9fa;
    border: 2px dashed #3498db;
}

.add-section-btn {
    position: relative;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px dashed #bdc3c7;
    background: none;
    color: #7f8c8d;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-section-btn:hover {
    border-color: #3498db;
    color: #3498db;
    background: #f8f9fa;
}

.section-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    margin-top: 5px;
}

.section-dropdown.show {
    display: block;
}

.section-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
}

.section-option:last-child {
    border-bottom: none;
}

.section-option:hover {
    background: #f6f8fa;
    color: #3498db;
}

.add-section-btn {
    position: relative;
}

.section-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.delete-section-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    opacity: 0;
    transition: all 0.2s;
}

.cv-section:hover .delete-section-btn {
    opacity: 1;
}

.delete-section-btn:hover {
    transform: scale(1.1);
    color: #c0392b;
}

/* Cover Letter Page Styles */
.page-container {
    max-width: 210mm;  /* A4 width */
    min-height: 297mm; /* A4 height */
    background: white;
    margin: 40px auto;
    padding: 40px 60px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.cover-letter-page {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.letter-header {
    margin-bottom: 40px;
}

.sender-info {
    text-align: left;
    margin-bottom: 30px;
}

.header-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.recipient-section {
    margin-top: 30px;
}

.date-input {
    margin-bottom: 20px;
}

.recipient-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.letter-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.letter-input {
    border: none;
    background: transparent;
    padding: 5px;
    width: 100%;
    font-size: 14px;
    color: #2c3e50;
    border-radius: 4px;
    transition: all 0.3s;
}

.letter-input:hover,
.letter-body-content:hover {
    background: #f8f9fa;
}

.letter-input:focus,
.letter-body-content:focus {
    background: white;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.greeting {
    margin-bottom: 20px;
    font-weight: 500;
}

.letter-body-content {
    width: 100%;
    height: calc(297mm - 300px); /* Fixed height accounting for other elements */
    padding: 10px;
    margin: 20px 0;
    border: none;
    font-size: 14px;
    line-height: 1.6;
    background: transparent;
    resize: none;
    transition: all 0.3s;
    overflow-y: hidden; /* Prevent scrolling */
}

.closing {
    margin-top: 20px;
}

.signature {
    margin-top: 10px;
    font-weight: 500;
}

/* Cover Letter Page Container Styles */
.page-container {
    width: 210mm;
    min-height: 297mm;
    margin: 40px auto;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    position: relative;
}

.cover-letter-page {
    padding: 40px 60px;
    width: 100%;
    height: 100%;
    position: relative;
}

.letter-header {
    margin-bottom: 40px;
}

.letter-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: calc(297mm - 250px);  /* Account for header and margins */
}

.letter-body-content {
    flex: 1;
    min-height: 400px;
    padding: 0;
    margin: 20px 0;
    line-height: 1.6;
    font-size: 14px;
}

.closing-section {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.letter-input.closing,
.letter-input.signature {
    margin-bottom: 10px;
}

/* Improve placeholder visibility */
.letter-input::placeholder,
.letter-body-content::placeholder {
    color: #95a5a6;
    opacity: 0.7;
}

/* Cover Letter Styles */
.letter-content {
    margin-top: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.letter-body-content {
    width: 100%;
    flex: 1;
    min-height: calc(297mm - 200px);
    padding: 20px;
    border: none;
    font-size: 14px;
    line-height: 1.8;
    background: transparent;
    resize: none;
    margin: 0;
}

.preview-document .letter-body-content {
    height: auto !important;
    min-height: calc(297mm - 200px) !important;
    padding: 20px !important;
    overflow: visible !important;
    white-space: pre-wrap !important;
}

.cv-input[type="select"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
}

.entry-item select.cv-input {
    cursor: pointer;
}

.entry-item select.cv-input:hover {
    background-color: #f8f9fa;
}

/* Cover Letter Preview Styles */
.editor-preview-content .cover-letter-page {
    padding: 40px;
    background: white;
}

.editor-preview-content .recipient-section {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.editor-preview-content .letter-input {
    border: none;
    background: transparent;
    padding: 8px;
    width: 100%;
    font-size: 14px;
    color: #2c3e50;
    border-radius: 4px;
    transition: all 0.3s;
}

.editor-preview-content .letter-input:hover,
.editor-preview-content .letter-body-content:hover {
    background: #f8f9fa;
}

.editor-preview-content .letter-input:focus,
.editor-preview-content .letter-body-content:focus {
    background: white;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.editor-preview-content .letter-body-content {
    width: 100%;
    min-height: 400px;
    padding: 10px;
    margin: 20px 0;
    border: none;
    font-size: 14px;
    line-height: 1.8;
    background: transparent;
    resize: none;
    transition: all 0.3s;
}

.editor-preview-content .letter-body-content::placeholder {
    color: #95a5a6;
    opacity: 0.7;
    white-space: pre-line;
}

.btn.disabled {
    background-color: #d1d5db !important;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.btn-success.disabled {
    background-color: #94d3a2 !important;
    border-color: #94d3a2;
}

/* Override hover effects for disabled buttons */
.btn.disabled:hover {
    background-color: #d1d5db !important;
    transform: none;
    box-shadow: none;
}

.subscription-plan {
    background-color: #8e44ad;
}

.subscription-plan:hover {
    background-color: #773993;
}

.event-card {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.event-card h3 {
    font-size: 1.2em;
    margin-bottom: 5px;
}

.event-card p {
    margin-bottom: 3px;
}

.event-card img {
    max-width: 100%;
    height: auto;
}
