html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.navbar-container {
    /*remove the container default padding attribute*/
    padding-left: 10px !important;
    padding-right: 10px !important;
    /*increase width as per your need*/
    max-width: 100%;
}

/** {
    outline: 1px solid red;*/ /* Visualize all element boundaries */
/*}*/


.body-container {
    /*remove the container default padding attribute*/
    padding-top: 0px !important;
    padding-left: 0px !important;
    padding-right: 0px !important;
    /*increase width as per your need*/
    max-width: 100%;
    max-height: 100%;
}

.nav-link {
    font: large !important;
}


/* ========================================== */
/* Rich Text Editor Styles                    */
/* ========================================== */

/* --- Editor Container --- */
.rich-text-editor-instance {
    position: relative;
    /* Base container styles */
}

/* --- Editor Area & Placeholder --- */
.editor-content {
    position: relative; /* Needed for pseudo-element positioning */
    line-height: 1.6;
    padding: 0.75rem 1rem;
    min-height: 150px; /* Default min height */
    overflow-y: auto;
    /* Inherits form-control styles like border, background */
    border-top-left-radius: 0; /* Force square top corners */
    border-top-right-radius: 0;
}

    /* Placeholder text using ::before (matches JS logic) */
    .editor-content.is-empty::before {
        content: attr(data-placeholder);
        color: #6c757d; /* Bootstrap's placeholder color */
        pointer-events: none;
        display: block;
        position: absolute;
        top: 0.75rem;
        left: 1rem;
        max-width: calc(100% - 2rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Softer Focus Style */
    .editor-content:focus {
        outline: 0;
        border-color: #adb5bd; /* Example: Gray border on focus */
        box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.25); /* Example: Gray focus ring */
    }


/* --- Toolbar --- */
.editor-toolbar {
    /* Using d-flex flex-wrap align-items-center from CSHTML */
    background-color: #f8f9fa;
    border-color: #dee2e6 !important;
    padding: 0.25rem 0.5rem;
    border-bottom: 0 !important; /* Style ensures no bottom border */
}

    /* Style for toolbar buttons */
    .editor-toolbar .btn {
        transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    }
/* Optional active state
.editor-toolbar .btn.btn-active {
  background-color: #cfe2ff;
  border-color: #b6d4fe;
} */


/* --- Editor Footer (Description & Counter) --- */
.editor-footer {
    /* Contains the description and character counter */
}


/* --- Content Elements (Inside Editor) --- */
.editor-content ul,
.editor-content ol {
    padding-left: 2.5em;
    margin-block-start: 0.8em;
    margin-block-end: 0.8em;
}

.editor-content li {
    margin-bottom: 0.4em;
}

.editor-content blockquote {
    border-left: 5px solid #adb5bd;
    padding-left: 1.2em;
    margin: 1em 0;
    color: #495057;
}

    .editor-content blockquote p:last-child {
        margin-bottom: 0;
    }

.editor-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    font-size: 1.6rem;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3em;
    line-height: 1.3;
}


/* --- Utility --- */
.char-counter-exceeded {
    font-weight: bold;
    /* Color is usually applied via .text-danger on the parent span by JS */
}


/* ========================================== */
/* Fullscreen Mode Styles                     */
/* ========================================== */

.rich-text-editor-instance.rte-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Use viewport units */
    height: 100vh; /* Use viewport units */
    z-index: 1050; /* Ensure it's above most other elements */
    background-color: #ffffff; /* Cover page content */
    display: flex;
    flex-direction: column;
    padding: 1rem; /* Padding around the fullscreen container */
    border: none; /* Remove original form-group border */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); /* Optional shadow */
    margin-bottom: 0 !important; /* Override default margin */
}

/* Adjust toolbar in fullscreen */
.rte-fullscreen .editor-toolbar {
    flex-shrink: 0; /* Prevent toolbar from shrinking */
    border-radius: 0.25rem 0.25rem 0 0; /* Adjust rounding */
    border: 1px solid #dee2e6 !important; /* Re-add border, override inline */
    border-bottom: 0 !important;
    padding: 0.5rem; /* Slightly more padding */
    /* Ensure flex properties from inline style are still effective */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* Adjust editor content area in fullscreen */
.rte-fullscreen .editor-content {
    flex-grow: 1; /* Allow editor to fill remaining vertical space */
    height: auto; /* Let flexbox control height */
    min-height: 200px; /* Can have a larger min-height */
    overflow-y: auto; /* Ensure scrolling */
    border-radius: 0 0 0.25rem 0.25rem; /* Adjust rounding */
    border: 1px solid #dee2e6; /* Re-add border */
    border-top: none; /* Remove top border */
    box-shadow: none; /* Remove original focus shadow if needed */
    padding: 1rem; /* Maybe more padding inside */
}
    /* Ensure focus ring is visible in fullscreen */
    .rte-fullscreen .editor-content:focus {
        border-color: #86b7fe; /* Bootstrap focus color example */
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus ring example */
    }

/* Adjust footer in fullscreen */
.rte-fullscreen .editor-footer {
    flex-shrink: 0; /* Prevent footer from shrinking */
    padding-top: 0.5rem; /* Space above the footer */
    /* Optional: Adjust background or positioning if needed */
    background-color: #f8f9fa; /* Match toolbar bg */
    padding: 0.5rem 1rem; /* Match toolbar padding */
    border-top: 1px solid #dee2e6; /* Separator line */
}


/* Hide the original label in fullscreen */
.rte-fullscreen .form-label {
    display: none;
}

/* --- Body Scroll Lock --- */
/* Class added to <body> via JS when fullscreen is active */
body.rte-fullscreen-active {
    overflow: hidden; /* Prevent scrolling the page behind */
}

/* --- Flash Error Animation (From JS) --- */
/* Included here for completeness */
.flash-error {
    animation: flash-red 0.5s ease-out;
}

@keyframes flash-red {
    0% {
        color: inherit;
    }

    50% {
        color: red;
        font-weight: bold;
    }

    100% {
        color: inherit;
    }
}

/* ========================================== */
/* Image Resizing Styles                      */
/* ========================================== */

.editor-content img {
    /* Ensure images are block or inline-block for proper dimension calculation */
    display: block; /* Or inline-block depending on desired flow */
    max-width: 100%; /* Prevent images from overflowing editor by default */
    height: auto; /* Maintain aspect ratio by default */
    cursor: pointer; /* Indicate they are clickable */
    position: relative; /* Needed if adding ::before/::after overlays directly */
}

    /* Style for the selected image (optional visual feedback) */
    .editor-content img.image-selected {
        outline: 2px solid #0d6efd; /* Bootstrap primary color */
        outline-offset: 2px;
    }

/* Overlay div that covers the selected image */
.resize-overlay {
    position: absolute;
    /* Positioned by JS */
    border: 1px dashed #0d6efd;
    pointer-events: none; /* Allows clicks to pass through to handles */
    z-index: 10; /* Ensure it's above the image content slightly */
    box-sizing: border-box;
    display: none; /* Hidden by default */
}

/* Base style for resize handles */
.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #0d6efd;
    border: 1px solid #fff;
    border-radius: 50%; /* Circle handles */
    pointer-events: auto; /* Make handles clickable */
    z-index: 11; /* Above overlay */
    box-sizing: border-box;
}

    /* Specific handle positions and cursors */
    .resize-handle.handle-se {
        bottom: -5px;
        right: -5px;
        cursor: nwse-resize;
    }

    .resize-handle.handle-sw {
        bottom: -5px;
        left: -5px;
        cursor: nesw-resize;
    }

    .resize-handle.handle-ne {
        top: -5px;
        right: -5px;
        cursor: nesw-resize;
    }

    .resize-handle.handle-nw {
        top: -5px;
        left: -5px;
        cursor: nwse-resize;
    }

/* You could add handles for N, S, E, W as well if needed */

/* Hide handles by default, shown when overlay is active */
.resize-handle {
    display: none;
}

.resize-overlay .resize-handle {
    display: block;
}