/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
:root {
    --editor-text: #B9A581;
    --editor-heading: #f0d8aa;
    --editor-accent: #c4a12d;
    --editor-bg: #0c0804;
    --editor-hover-bg: #2a1c0d;
    --editor-border-soft: rgba(196, 161, 45, 0.2);
    --editor-border-medium: rgba(196, 161, 45, 0.335);
}

.sun-editor-editable .se-component.se-align-left,
.sun-editor-editable .se-component.__se__float-left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.sun-editor-editable .se-component.se-align-right,
.sun-editor-editable .se-component.__se__float-right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.sun-editor-editable .se-component.se-align-center,
.sun-editor-editable .se-component.__se__float-center {
    display: table;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem;
}

/* Clearfix for the article container */
.sun-editor-editable::after {
    content: "";
    display: table;
    clear: both;
}

/* Ensure content looks exactly like the editor */
.sun-editor-editable {
    font-family: Verdana, sans-serif !important;
    color: var(--editor-text) !important;
    line-height: 1.8 !important;
    background-color: transparent !important;
}

/* Strip SunEditor's built-in padding when used outside the editor widget */
article.sun-editor-editable {
    padding: 0 !important;
}

/* Remove top margin from the first heading so panel padding is uniform */
article.sun-editor-editable > *:first-child {
    margin-top: 0 !important;
}

/* Fix SunEditor white-boxing in Admin */
.sun-editor {
    background-color: var(--editor-bg) !important;
    border-color: var(--editor-border-soft) !important;
}

.sun-editor .se-container,
.sun-editor .se-wrapper,
.sun-editor .se-toolbar {
    background-color: var(--editor-bg) !important;
    border-color: var(--editor-border-medium) !important;
    color: var(--editor-text) !important;
}

.sun-editor .se-toolbar .se-btn-module-border,
.sun-editor .se-toolbar.sun-editor-common {
    border: 1px solid #585127;
    border-radius: 4px;
    margin-left: 1px;
    margin-right: 1px;
    outline: none;
}

.sun-editor button.se-btn {
    color: var(--editor-text) !important;
}

.sun-editor button.se-btn:hover {
    background-color: var(--editor-hover-bg) !important;
    color: var(--editor-heading) !important;
}

.sun-editor-editable h1,
.sun-editor-editable h2,
.sun-editor-editable h3 {
    color: var(--editor-heading) !important;
    background: none !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    border: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.sun-editor-editable h1 {
    font-family: Acme, sans-serif !important;
    font-size: 1.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}

.sun-editor-editable h2 {
    font-family: Acme, sans-serif !important;
    font-size: 1.2rem !important;
    color: var(--editor-accent) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.sun-editor-editable h3 {
    font-family: Signika, sans-serif !important;
    font-size: 1rem !important;
    color: var(--editor-heading) !important;
}

.sun-editor-editable a {
    color: var(--editor-accent) !important;
    text-decoration: underline !important;
}

.sun-editor-editable blockquote {
    border-left: 4px solid var(--editor-accent) !important;
    padding-left: 1.5em !important;
    font-style: italic !important;
    margin: 2em 0 !important;
}

/* Remove table borders */
.sun-editor-editable table,
.sun-editor-editable table th,
.sun-editor-editable table tr,
.sun-editor-editable table td {
    border: none !important;
}

/* Themed range slider - tracks and thumbs matching admin gold palette */
.admin-range {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: transparent;
    outline: none;
    cursor: pointer;
}

.admin-range::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(196, 161, 45, 0.12);
    border-radius: 2px;
    border: 1px solid rgba(196, 161, 45, 0.25);
}

.admin-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #c4a12d;
    margin-top: -6px;
    cursor: pointer;
    border: 0;
    box-shadow: 0 0 6px rgba(196, 161, 45, 0.35);
}

.admin-range::-moz-range-track {
    height: 4px;
    background: rgba(196, 161, 45, 0.12);
    border-radius: 2px;
    border: 1px solid rgba(196, 161, 45, 0.25);
}

.admin-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #c4a12d;
    border: 0;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(196, 161, 45, 0.35);
}

@media (max-width: 640px) {
    .sun-editor-editable .se-component {
        width: 38% !important;
    }
    .sun-editor-editable .se-component img {
        width: 100% !important;
        height: auto !important;
    }
}

/* Truncation tooltip - shown above Ruby-truncated text on hover */
.admin-tooltip-wrapper {
    position: relative;
    cursor: pointer;
}

.admin-tooltip-content {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a0e;
    border: 1px solid rgba(196, 161, 45, 0.25);
    color: #d4c89a;
    font-size: 11px;
    line-height: 1.4;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: normal;
    word-break: break-word;
    z-index: 100;
    pointer-events: none;
    max-width: 320px;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.admin-tooltip-wrapper:hover .admin-tooltip-content {
    display: block;
}

.admin-tooltip-arrow {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(196, 161, 45, 0.25);
}
