/* Base container styles */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    min-height: 0;
    /* Allow flex child to shrink */
}

.editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
    transition: all 0.3s ease;
    /* Add smooth transition */
}

.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: none;
    transition: all 0.3s ease;
    /* Add smooth transition */
}

/* Quill Editor styles */
#quill-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 6px;
    box-shadow: none;
}

.ql-container.ql-bubble {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    border: none;
}

.ql-editor {
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
    padding: 0;
    border: none;
    transition: all 0.3s ease;
}

/* Style the bubble toolbar */
.ql-bubble .ql-tooltip {
    background-color: #1f2937;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
    color: white;
}

.ql-bubble .ql-tooltip-arrow {
    border-bottom: 6px solid #1f2937;
}

.ql-bubble .ql-tooltip input[type=text] {
    background: white;
    border-radius: 4px;
    border: none;
    outline: none;
    padding: 8px 12px;
    color: #1f2937;
    font-size: 14px;
    width: 200px;
}

.ql-bubble .ql-tooltip a {
    color: white;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.ql-bubble .ql-tooltip a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.ql-bubble .ql-tooltip a.ql-action::after {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: 8px;
    padding-right: 8px;
}

/* Improve toolbar button states */
.ql-bubble .ql-toolbar button:hover,
.ql-bubble .ql-toolbar button.ql-active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.ql-bubble .ql-toolbar button:hover .ql-stroke,
.ql-bubble .ql-toolbar button.ql-active .ql-stroke {
    stroke: white;
}

.ql-bubble .ql-toolbar button:hover .ql-fill,
.ql-bubble .ql-toolbar button.ql-active .ql-fill {
    fill: white;
}

/* Style the tooltip links */
.ql-bubble .ql-tooltip a.ql-remove::before,
.ql-bubble .ql-tooltip a.ql-action::after {
    color: rgba(255, 255, 255, 0.8);
}

/* Style the color picker */
.ql-bubble .ql-color-picker .ql-picker-options {
    background-color: #1f2937;
    border: none;
    padding: 8px;
    border-radius: 8px;
}

/* Hide toolbar */
.ql-toolbar.ql-snow {
    display: none;
}

/* Update heading styles */
.ql-editor h1 {
    font-size: 36px;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.ql-editor h2 {
    font-size: 30px;
    margin-bottom: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}

.ql-editor h3 {
    font-size: 24px;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.ql-editor h4 {
    font-size: 20px;
    margin-bottom: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Update paragraph styles */
.ql-editor p {
    font-size: 18px;
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Add spacing between elements */
.ql-editor>*+* {
    margin-top: 0.5rem;
}

/* Add extra spacing after headings */
.ql-editor h1+*,
.ql-editor h2+*,
.ql-editor h3+*,
.ql-editor h4+* {
    margin-top: 1rem;
}

/* Update blockquote style */
.ql-editor blockquote {
    border-left: 4px solid #e5e7eb;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-size: 1.125rem;
    color: #4b5563;
    line-height: 1.8;
}

/* Add smooth transitions */
.ql-editor,
.ql-editor * {
    transition: all 0.3s ease;
}

/* Improve code block appearance */
.ql-editor pre.ql-syntax {
    background-color: #f3f4f6;
    color: #1f2937;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
}

/* Theme reset button styles */
.theme-reset {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.reset-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #4b5563;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.reset-button:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.reset-button i {
    font-size: 14px;
}

.reset-button:active {
    transform: scale(0.98);
}

/* Update mobile styles */
@media (max-width: 768px) {
    .ql-editor h1 {
        font-size: 32px;
    }

    .ql-editor h2 {
        font-size: 26px;
    }

    .ql-editor h3 {
        font-size: 22px;
    }

    .ql-editor h4 {
        font-size: 18px;
    }

    .ql-editor p {
        font-size: 16px;
    }
}