/* === GLOBAL === */
[v-cloak] {
    display: none;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--axiom-bg);
    color: var(--axiom-text-main);
    font-family: var(--axiom-font);
    padding: 0px;
    margin: 0px;
    letter-spacing: .1em;
    font-size: var(--app-font-size);
}

:root {
    --navy: #08101E;
    --navy-mid: #0D1A2E;
    --navy-light: #122040;
    --teal: #00C4A0;
    --teal-dim: rgba(0,196,160,0.12);
    --teal-border: rgba(0,196,160,0.28);
    --orange: #E8722A;
    --blue-dot: #378ADD;
    --text-primary: #EEF2F8;
    --text-secondary: rgba(238,242,248,0.6);
    --text-muted: rgba(238,242,248,0.35);
    --border: rgba(238,242,248,0.08);
    --border-mid: rgba(238,242,248,0.14);
}

h2 {
    color: var(--axiom-text-bright);
    font-size: 1.45rem;
    margin-bottom: 0.5rem;
}

.axiom {
    --p-drawer-header-padding: .5em 1em;
}

.app-main {
    min-height: calc(100vh + 10px);
}

/* =========================
   SHELL LAYOUT
========================= */

.axiom-shell {
    display: flex;
    width: 100%;
    --height: 100vh;
    min-height: 100vh;
    --background: var(--axiom-bg);
    color: var(--axiom-text-main);
    font-family: var(--axiom-font);
    align-items: stretch;
}

/* === MENUBAR (Topbar) === */
.p-menubar {
    background: var(--axiom-bg) !important;
    border: none !important;
    border-bottom: 1px solid var(--axiom-border-accent);
    padding: 0.75rem 1.5rem;
}

    /* menu links */
    .p-menubar .p-menuitem-link {
        color: var(--axiom-text-dim);
        letter-spacing: 0.12em;
        font-size: 0.75rem;
        text-transform: uppercase;
    }

        /* hover */
        .p-menubar .p-menuitem-link:hover {
            color: var(--axiom-text-main);
        }

/* === BUTTON (CTA) === */
.p-button {
    background: var(--axiom-primary);
    color: #042f2e;
    border: none;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.6rem 1.2rem;
}

    .p-button:hover {
        background: var(--axiom-primary-strong);
    }





    /* === OUTLINE BUTTON === */
    .p-button.p-button-outlined {
        background: transparent;
        border: 1px solid var(--axiom-border-accent);
        color: var(--axiom-text-main);
    }

        .p-button.p-button-outlined:hover {
            border-color: var(--axiom-primary);
            color: var(--axiom-primary);
        }

/* === INPUT === */
.p-inputtext {
    background: var(--axiom-bg);
    border: 1px solid var(--axiom-border-subtle);
    color: var(--axiom-text-main);
}


/* === FOOTER === */
footer {
    border-top: 2px solid var(--axiom-border-accent);
    background: var(--axiom-bg);
    min-height: 50vh;
}

.footer-inner {
    padding: 40px clamp(16px, 5vw, 80px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 1em;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-tagline {
    font-size: .8rem;
    letter-spacing: 2px;
    color: rgba(0, 196, 160, 0.55);
    text-transform: uppercase;
}

.footer-copy {
    font-size: 10px;
    color: var(--axiom-text-dim);
    letter-spacing: 1px;
}

.footer-name {
    font-size: 13px;
    color: var(--text-bright);
    line-height: 1.2;
    display: block;
}

.footer-tagline-brand {
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(232, 114, 42, 0.8);
    text-transform: uppercase;
    display: block;
}

/* =========================
   CARDS
========================= */
.axiom .p-card-title {
    font-size: 1rem;
    font-weight: 300;
}

.card-dark {
    background: var(--axiom-bg) !important;
    color: var(--axiom-text-main) !important;
    border: none;
}

/* =========================
   SKELETONS
========================= */

.axiom-skeleton-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.axiom .p-skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.06) !important;
}

    .axiom .p-skeleton::after {
        content: "";
        position: absolute;
        inset: 0;
        transform: translateX(-100%);
        background: linear-gradient( 90deg, transparent 0%, rgba(255,255,255,0.10) 45%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.10) 55%, transparent 100% );
        animation: axiomShimmer 1.4s infinite;
    }

@keyframes axiomShimmer {
    100% {
        transform: translateX(100%);
    }
}

.justify-end {
    justify-content: flex-end;
}

body.drawer-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width);
}

li.p-tieredmenu {
    list-style: none;
}

.drawer-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.read-only-panel {
    font-size: .7em;
}

.new-mode .read-only-panel {
    display: none;
}

.p-tieredmenu-item {
    list-style-type: none;
}

/* Backdrop */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.65);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}

    .mobile-nav-overlay.visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

/* Full-screen panel */

.mobile-nav-panel {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--axiom-bg-elevated);
    transform: translateY(-100%);
    transition: transform .25s ease;
}

.mobile-nav-overlay.visible .mobile-nav-panel {
    transform: translateY(0);
}

/* Sticky header */

.mobile-nav-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--axiom-bg-elevated);
    border-bottom: 1px solid var(--axiom-border-accent);
}

.mobile-nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Scrollable content */

.mobile-nav-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
}

/* Prevent page scrolling while menu is open */

body.mobile-nav-open {
    overflow: hidden;
}

/* Slide down animation */

.mobile-nav-enter-active,
.mobile-nav-leave-active {
    transition: opacity 0.25s ease;
}

.mobile-nav-enter-from,
.mobile-nav-leave-to {
    opacity: 0;
}

.mobile-nav-panel {
    transition: transform 0.25s ease;
}

.mobile-nav-enter-from .mobile-nav-panel,
.mobile-nav-leave-to .mobile-nav-panel {
    transform: translateY(-100%);
}

.mobile-nav-enter-to .mobile-nav-panel,
.mobile-nav-leave-from .mobile-nav-panel {
    transform: translateY(0);
}

/* ==========================================
   POST COMPOSER DIALOG
   ========================================== */

.axiom-post-dialog {
    width: 60vw !important;
    height: 90vh !important;
    max-width: none !important;
    min-width: 400px;
    max-height: none !important;
}

@media (max-width: 768px) {
    .axiom-post-dialog {
        width: 100vw !important;
        height: 100vh !important;
    }
}

.axiom-post-dialog .p-dialog-header {
    background: var(--axiom-bg-surface);
    color: var(--axiom-text-main);
    border-bottom: 1px solid var(--axiom-border-subtle);
    padding: 0.75rem 1rem;
}

.axiom-post-dialog .p-dialog-content {
    background: var(--axiom-bg);
    color: var(--axiom-text-main);
    padding: 0.75rem;
}

.axiom-post-dialog .p-dialog-footer {
    background: var(--axiom-bg-surface);
    border-top: 1px solid var(--axiom-border-subtle);
    padding: 0.75rem 1rem;
}

/* ==========================================
   FORM LABELS
   ========================================== */

.axiom-post-label {
    color: var(--axiom-text-bright);
    font-weight: 600;
    font-size: 0.95rem;
}

.axiom-muted {
    color: var(--axiom-text-muted);
}

/* ==========================================
   INPUTS
   ========================================== */

.axiom-post-dialog .p-inputtext,
.axiom-post-dialog textarea,
.axiom-post-dialog textarea.p-textarea.p-variant-filled:enabled,
.axiom-post-dialog input.p-inputtext.p-variant-filled:enabled {
    background: var(--axiom-bg-surface);
    color: var(--axiom-text-main);
    border-color: var(--axiom-border-subtle);
}

    .axiom-post-dialog .p-inputtext:focus,
    .axiom-post-dialog textarea:focus,
    .axiom-post-dialog textarea.p-textarea.p-variant-filled:enabled:focus,
    .axiom-post-dialog textarea.p-textarea.p-variant-filled:enabled:hover,
    .axiom-post-dialog input.p-inputtext.p-variant-filled:enabled:focus,
    .axiom-post-dialog input.p-inputtext.p-variant-filled:enabled:hover {
        border-color: var(--axiom-primary);
        box-shadow: 0 0 0 1px var(--axiom-primary);
    }

/* ==========================================
   FILE INPUT
   ========================================== */

.axiom-post-dialog input[type="file"] {
    color: var(--axiom-text-main);
}

/* ==========================================
   DIVIDERS
   ========================================== */

.axiom-post-dialog .p-divider {
    margin: 0.5rem 0;
    border-color: var(--axiom-border-subtle);
}

/* ==========================================
   IMAGE PREVIEW
   ========================================== */

.axiom-image-preview {
    background: var(--axiom-bg-surface);
    border: 1px solid var(--axiom-border-subtle);
    border-radius: 12px;
    padding: 0.75rem;
    height: 100%;
}

.axiom-preview-image {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    display: block;
}

/* ==========================================
   IMAGE GRID
   ========================================== */

.axiom-image-preview small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {

    .axiom-post-dialog .p-dialog-header,
    .axiom-post-dialog .p-dialog-footer {
        padding: 0.75rem;
    }

    .axiom-post-dialog .p-dialog-content {
        padding: 0.5rem;
    }
}

/* ==========================================
   DROPZONE
   ========================================== */

.axiom-dropzone {
    border: 2px dashed var(--axiom-border-accent);
    background: var(--axiom-bg-surface);
    border-radius: 16px;
    padding: 1rem;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

    .axiom-dropzone:hover {
        border-color: var(--axiom-primary);
        transform: translateY(-1px);
    }

    .axiom-dropzone.drag-over {
        border-color: var(--axiom-primary);
        background: var(--axiom-bg-alt);
        box-shadow: 0 0 0 1px var(--axiom-primary), 0 0 25px rgba(20,184,166,.15);
    }

.axiom-dropzone-icon {
    font-size: 2.5rem;
    color: var(--axiom-primary);
}

.axiom-dropzone-title {
    color: var(--axiom-text-main);
    font-weight: 600;
    font-size: 1.1rem;
}

.axiom-dropzone-subtitle {
    color: var(--axiom-text-muted);
}

.axiom-dropzone-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--axiom-border-subtle);
    background: var(--axiom-bg);
}

.axiom-preview-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

/* ==========================================
   IMAGE CARDS
   ========================================== */

.axiom-image-card {
    background: var(--axiom-bg-surface);
    border: 1px solid var(--axiom-border-subtle);
    border-radius: 14px;
    overflow: hidden;
}

.axiom-image-wrapper {
    position: relative;
}

.axiom-preview-image {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.axiom-image-remove {
    position: absolute !important;
    top: .4rem;
    right: .4rem;
    z-index: 2;
    backdrop-filter: blur(6px);
}

.axiom-image-meta {
    padding: .75rem;
}

.axiom-image-name {
    color: var(--axiom-text-main);
    font-size: .9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.axiom-image-size {
    color: var(--axiom-text-muted);
    font-size: .8rem;
    margin-top: .25rem;
}

.axiom-dropzone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.axiom-dropzone-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1rem;
}

.axiom-dropzone-icon {
    font-size: 2rem;
    color: var(--axiom-primary);
}

.axiom-dropzone:hover {
    border-color: var(--axiom-primary);
}

.axiom-dropzone.drag-over {
    border-color: var(--axiom-primary);
    background: var(--axiom-bg-alt);
    box-shadow: 0 0 0 1px var(--axiom-primary), 0 0 20px rgba(20,184,166,.15);
}

.axiom-post-dialog .p-divider {
    margin: 0.5rem 0;
}

.axiom-post-dialog .p-dialog-header {
    padding: 0.75rem 1rem;
}

.axiom-post-dialog .p-dialog-footer {
    padding: 0.75rem 1rem;
}

.axiom a.p-button {
    text-decoration: none;
}

    .axiom a.p-button:hover,
    .axiom a.p-button:focus,
    .axiom a.p-button:active {
        text-decoration: none;
    }

.nowrap {
    white-space: nowrap;
}

/* larger */
@media (min-width: 768px) {
    .footer-inner {
        align-items: flex-start;
        flex-direction: row;
        gap: 0.1rem;
    }
}

/*button that hides text on small screens*/
@container (max-width: 400px) {
    .no-mobile-text-btn .p-button-label {
        display: none;
    }
}

/*container enabling container queries*/
.container {
    container-type: inline-size;
}

@container (max-width: 400px) {
    .container .small-hide {
        display: none;
    }
}

.p-image-rotate-right-button.p-image-action, .p-image-rotate-left-button.p-image-action, .p-image-zoom-out-button.p-image-action, .p-image-zoom-in-button.p-image-action {
    display: none;
}

/*CONTENT LINKS*/
.content-link {
    color: #14b8a6;
    text-decoration: none;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

    .content-link:hover {
        color: #2dd4bf;
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
    }

    .content-link:focus-visible {
        outline: 2px solid #14b8a6;
        outline-offset: 2px;
        border-radius: 2px;
    }

    .content-link:visited {
        color: #14b8a6;
    }

/*Delete Button*/
.entity-delete-button.p-button-text.p-button-danger {
    border-color: var(--p-button-outlined-primary-border-color);
    background: var(--p-button-outlined-primary-hover-background);
}

    .entity-delete-button.p-button-text.p-button-danger:not(:disabled):hover {
        border-color: var(--p-button-text-danger-hover-background);
        transform: scale(1.1);
        background: rgba(0, 0, 0, 0.8) !important;
    }

/*Edit Button*/
.entity-edit-button.p-button-text {
    border-color: var(--p-button-outlined-primary-border-color);
    background: var(--p-button-outlined-primary-hover-background);
}

    .entity-edit-button.p-button-text:not(:disabled):hover {
        border-color: var(--p-button-text-danger-hover-background);
        transform: scale(1.1);
        background: rgba(0, 0, 0, 0.8) !important;
    }

.p-button.user-button {
    background-color: rgba(52, 211, 153, .7);
    border: 0px;
}

/* =========================
   TOASTS
========================= */

.p-toast.p-component, .p-toast.p-component > div {
    width: 40rem;
    max-width: calc(100vw - 2rem); /* keeps it from overflowing on mobile */
}

/* Survey toast: light card with teal border */
.p-toast.survey-toast .p-toast-message {
    background: var(--axiom-bg-lite); /* #dde8e7, light teal-gray */
    border: 1px solid var(--axiom-primary); /* #14b8a6 */
    color: var(--axiom-text-navy); /* #08101E */
    box-shadow: 0 6px 20px rgba(8, 16, 30, 0.25);
}

/* Title (row 1) */
.p-toast.survey-toast .p-toast-message-content .survey-toast-title {
    color: var(--p-teal-800); /* #115e59, deep teal */
    font-weight: 700;
}

/* Row 2: message on the left, button on the right */
.p-toast.survey-toast .survey-toast-row {
    display: flex;
    align-items: center; /* vertically centers the button against the message */
    gap: 0.75rem; /* small gap between message and button */
}

.p-toast.survey-toast .survey-toast-text {
    flex: 1 1 auto; /* message takes the remaining width */
    min-width: 0; /* allows long text to wrap */
}

/* Button link: only as wide as its content */
.p-toast.survey-toast .p-toast-message-content a.survey-toast-btn {
    flex: 0 0 auto; /* don't grow or shrink */
    align-self: center;
    display: inline-block;
    white-space: nowrap; /* keep the label on one line */
    padding: 0.4rem 1rem;
    background: var(--axiom-primary); /* #14b8a6 */
    color: var(--axiom-text-navy); /* dark text for contrast on teal */
    border-radius: 2rem; /* matches PrimeVue's rounded buttons */
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

    .p-toast.survey-toast .p-toast-message-content a.survey-toast-btn:hover {
        background: var(--axiom-primary-strong); /* #0d9488 */
        color: #fff;
    }

/* Narrow screens: stack message above button */
@media (max-width: 480px) {
    .p-toast.survey-toast .survey-toast-row {
        flex-direction: column;
        align-items: stretch;
    }

    .p-toast.survey-toast .p-toast-message-content a.survey-toast-btn {
        align-self: flex-start;
    }
}
