﻿
/* --- Live Editor Styles --- */
.live-editor-page-container {
    padding-top: 2rem;
    padding-bottom: 5rem; /* More space at bottom */
}

.editor-toolbar {
    position: sticky;
    top: calc(var(--navbar-height) + 1px); /* Stick below the main navbar */
    background-color: #f8f9fa; /* Lighter than navbar */
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.save-status-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.save-status-text {
    font-size: 0.85rem;
    font-style: italic;
    transition: color 0.3s ease, opacity 0.3s ease;
}

    .save-status-text.text-success, .save-status-container i.text-success {
        color: var(--accent-color);
    }

    .save-status-text.text-warning, .save-status-container i.text-warning {
        color: var(--warning-color);
    }

    .save-status-text.text-danger, .save-status-container i.text-danger {
        color: var(--danger-color);
    }


.live-editor-document-wrapper {
    background-color: var(--light-color); /* Light grey background for the "page" */
    padding: 2rem 0; /* Vertical padding */
}

.modern-resume-preview-v2 { /* The main editable resume document */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 850px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Base style for any contenteditable element */
.editable-content-area {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px dashed transparent;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    cursor: text;
    line-height: inherit; /* Inherit line height from parent */
    width: 100%;
    min-height: 1.5em; /* Ensure empty elements are clickable */
}

    .editable-content-area:hover {
        border-color: #cce7ff;
    }

    .editable-content-area:focus {
        outline: none;
        border-color: var(--primary-color);
        background-color: #f8fbff;
        box-shadow: 0 0 0 2px rgba(0,123,255,0.2);
    }

    .editable-content-area p.placeholder {
        color: #b0b0b0;
        font-style: italic;
        pointer-events: none;
        user-select: none;
    }

    .editable-content-area.editable-textarea { /* For multiline text areas */
        white-space: pre-wrap;
        word-wrap: break-word;
    }


/* Styling for list item editor blocks */
.list-item-editor {
    position: relative;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fdfdfd;
}

    .list-item-editor h5 { /* For titles like "Experience #1" */
        font-size: 1rem;
        color: var(--secondary-color);
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px dashed #eee;
    }

    .list-item-editor:hover .btn-remove-item {
        opacity: 1; /* Show remove button on hover */
    }

.btn-remove-item {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.2; /* Hidden until hover */
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    transition: opacity 0.2s ease;
}

    .btn-remove-item:hover {
        background-color: #fdd;
    }

.btn-icon-add {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    padding: 0.3rem 0.7rem;
    background-color: transparent;
    border: 1px dashed var(--primary-color);
    color: var(--primary-color);
}

    .btn-icon-add:hover {
        background-color: rgba(0,123,255,0.1);
    }

/* Inherit styles from modern resume preview */
.mrp-name.editable-h1 {
    font-size: 2em;
    font-weight: bold;
}
/* ... (Ensure other mrp-* styles are available) ... */
/* styles.css */

.editor-toolbar {
    position: sticky;
    top: var(--navbar-height); /* Stick below main navbar */
    background-color: #f8f9fa;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.save-status-text { /* ... styles from previous answer ... */
}

/* The main resume document area in editor mode */
.resume-preview-document {
    /* Use your v2 modern preview styles as a base */
}

/* Base style for any contenteditable element */
.editable-content-area {
    min-height: 1.5em; /* Ensure empty elements have height to be clicked */
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px dashed transparent; /* Invisible border by default */
    transition: border-color 0.2s ease, background-color 0.2s ease;
    cursor: text;
}

    .editable-content-area:hover {
        border-color: #cce7ff; /* Light blue dashed border on hover */
    }

    .editable-content-area:focus {
        outline: none; /* Remove default browser outline */
        border-color: var(--primary-color);
        background-color: white;
        box-shadow: 0 0 0 2px rgba(0,123,255,0.2);
    }

    .editable-content-area p.placeholder {
        color: #b0b0b0;
        font-style: italic;
        pointer-events: none;
        user-select: none;
    }
/* Style specific editable fields to look like their final form */
.editable-h1 {
    font-size: 2em; /* from mrp-name */
    font-weight: bold;
}

.mrp-job-title-sidebar { /* Example */
    font-size: 1.1em;
    font-weight: 500;
}

/* For EditableList component */
.editable-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2px;
}

    .editable-list-item .editable-content-area {
        flex-grow: 1; /* Text area takes up space */
    }

.btn-icon-remove, .btn-icon-add {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.25rem;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
}

    .btn-icon-remove:hover {
        color: var(--danger-color);
        background-color: #fdd;
    }

.btn-icon-add {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-top: 0.5rem;
}

    .btn-icon-add:hover {
        color: var(--primary-color);
        background-color: #e6f2ff;
    }


/* In styles.css */

/* The wrapper around an editable section */
.inline-edit-wrapper {
    position: relative;
    padding: 2px 0; /* Give a little space for the focus ring */
}

/* The styled, non-editable text visible by default */
.inline-edit-text {
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px dashed transparent; /* Invisible border */
    transition: background-color 0.2s ease;
    min-height: 1.5em;
    cursor: text;
}

.inline-edit-wrapper:hover .inline-edit-text {
    background-color: var(--primary-color-soft, #e6f2ff); /* Highlight on hover */
    border-color: #cce7ff;
}

/* Placeholder style for empty text */
.inline-edit-text.is-placeholder {
    color: #999;
    font-style: italic;
}

/* The actual input field, hidden by default */
.inline-edit-input {
    display: none; /* Hidden until edit mode is active */
    width: 100%;
    padding: 3px 5px; /* Match text padding but account for border */
    font-family: inherit; /* Use same font as display text */
    font-size: inherit;
    line-height: inherit;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.2);
    outline: none;
}
    /* For textareas */
    .inline-edit-input[type="textarea"] {
        resize: vertical;
    }

/* When the wrapper is in edit mode, hide text and show input */
.inline-edit-wrapper.is-editing .inline-edit-text {
    display: none;
}

.inline-edit-wrapper.is-editing .inline-edit-input {
    display: block;
}