/*** Styles specific to snipe.fabri.cc ***/

/* =========================
   SNIPE THEME TOKENS
   ========================= */

:root,
html[data-theme="light"]{
    --font-ui: "Roboto Flex", Roboto, sans-serif;
    --font-mono: "Sanchez", serif;
    --ease: cubic-bezier(.2,.8,.2,1);
    --bg: linear-gradient(#f2f5f7, #e8edf1, #dde4ea);
    --text: rgba(15,18,20,.92);
    --muted: rgba(15,18,20,.68);

    --glass: rgba(255,255,255,.56);
    --glass-strong: rgba(255,255,255,.74);
    --glass-soft: rgba(255,255,255,.40);
    --ink: rgba(0,0,0,.05);

    --border: rgba(0,0,0,.10);
    --border-soft: rgba(0,0,0,.07);

    --shadow-lg: 0 20px 60px rgba(0,0,0,.16);
    --shadow-md: 0 14px 40px rgba(0,0,0,.14);
    --shadow-sm: 0 10px 24px rgba(0,0,0,.10);

    --btn-bg: rgba(0,0,0,.05);
    --btn-bg-hover: rgba(0,0,0,.085);
    --btn-border: rgba(74, 81, 83, 0.12);

    --btnColor: #828ca5;
    --btnColorAlt: #afb3bb;
    --btnLight: #afb7bb;
    
    --input-bg: rgba(255,255,255,.76);
    --input-border: rgba(0,0,0,.10);
    --input-text: rgba(15,18,20,.92);
    --placeholder: rgba(15,18,20,.50);
    
    --overlay: rgba(227, 207, 187, 0.52);
    /* old: --overlay: rgba(255,255,255,.42); */

    --accent: #3d465e;
    --accent-strong: #5d6b8e;
    --accent-soft: rgba(52,136,144,.12);

    --panel-bg: var(--glass);
    --panel-bg-strong: var(--glass-strong);
    --card-bg: rgba(255,255,255,.58);

    --topbar-text: rgba(15,18,20,.78);
    --menu-text: rgba(15,18,20,.88);
    
    --modalBG: rgba(255, 255, 255, 0.35);
    
    --mainColor: #828ca5; /* grey */ 
    --invert: #faac18; /* yellow */
    --baseColor: rgba(255,255,255,1); /* white */
    --baseColor018: rgba(255,255,255,.18);
    --baseColor060: rgba(255,255,255,.60);
    --baseColor078: rgba(255,255,255,.78);
    --footColor: #49515b;
    
    --subMenuFake: #ece9ec;
    --matFake: #f7f7f9;
}

/* Dark theme */
html[data-theme="dark"]{
    --bg: linear-gradient(#40484f, #41454f, #30373c);
    --text: rgba(255,255,255,.92);
    --muted: rgba(255,255,255,.72);

    --glass: rgba(255,255,255,.08);
    --glass-strong: rgba(255,255,255,.12);
    --glass-soft: rgba(255,255,255,.05);
    --ink: rgba(0,0,0,.12);

    --border: rgba(255,255,255,.18);
    --border-soft: rgba(255,255,255,.10);

    --shadow-lg: 0 20px 60px rgba(0,0,0,.35);
    --shadow-md: 0 14px 40px rgba(0,0,0,.28);
    --shadow-sm: 0 10px 24px rgba(0,0,0,.18);

    --btn-bg: rgba(255,255,255,.10);
    --btn-bg-hover: rgba(255,255,255,.16);
    --btn-border: rgba(255,255,255,.14);
    
    --btnColor: #faac18; /* alt: dc9a32 */
    --btnColorAlt: #9682a7;
    --btnLight: #B0832D;
    
    --input-bg: rgba(0,0,0,.18);
    --input-border: rgba(255,255,255,.18);
    --input-text: rgba(255,255,255,.92);
    --placeholder: rgba(255,255,255,.58);

    --overlay: rgba(19, 14, 32, 0.7);
    --blur: blur(14px) saturate(140%);

    --accent: #faac18;
    --accent-strong: #4ca9bf;
    --accent-soft: rgba(111,184,194,.18);

    --panel-bg: var(--glass);
    --panel-bg-strong: var(--glass-strong);
    --card-bg: rgba(255,255,255,.07);

    --topbar-text: rgba(255,255,255,.82);
    --menu-text: rgba(255,255,255,.88);
    
    --modalBG: rgba(0, 0, 0, 0.35);
    
    --mainColor: #faac18; /* yellow */
    --invert: #828ca5; /* grey */
    --baseColor: rgba(0,0,0,1); /* black */
    --baseColor018: rgba(0,0,0,.18);
    --baseColor060: rgba(34, 32, 38, 0.55);
    --baseColor078: rgba(0,0,0,.78);
    --footColor: #faac18;
    
    --subMenuFake: #000;
    --blackVelvet: rgba(23, 25, 41, 0.7);
    --matFake: #f7f7f9;
}

body {
    background: #f4f4f4 url('imgs/fabric-common-snipe-bg-1.jpg') no-repeat;
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
}

p, a, label, input, text {
    font-family: var(--font-ui);
}

#backdrop {
    background-image: url('imgs/fabric-common-snipe-bg-1.jpg');
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
}

/* Image to URL */

#imageList {
	max-width: 100%;
  	overflow: hidden;
}

#imageList img {
	width:32%; 
	margin:.5%;
}

.tabBar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tabBtn {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    cursor: pointer;
    border-radius: 5px;
}

.tabBtn.active { background: #333; color: #fff; }

.tabContent { display: none; }
.tabContent.active { display: block; }

textarea { width: 100%; height: 120px; font-family: monospace; }
.notesArea { min-height: 150px; border: 1px solid #ccc; padding: 10px; background: #fff; }

.outputBox { margin-top: 20px; background: #f5f5f5; padding: 10px; border-radius: 5px; }

.snipeModal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.snipeModal-content {
  background: #fff; padding: 1.5rem; border-radius: 10px;
  width: 90%; max-width: 600px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
.snipeModal-content textarea {
  width: 100%; height: 100px; margin-bottom: 10px;
  font-family: monospace; font-size: 14px;
}
.snipeModal-actions {
  text-align: right; margin-top: 1rem;
}


.topOrgSwitcher {
    position: relative;
    min-width: 0;
}

.topOrgTrigger {
    min-height: 34px;
    max-width: 220px;
    padding: 0 34px 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(255,255,255,.55) !important;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: none;
    position: relative;
}

html[data-theme="dark"] .topOrgTrigger {
    background: rgba(0,0,0,.28) !important;
    border-color: rgba(255,255,255,.14);
}

.topOrgTrigger:hover {
    transform: translateY(-1px);
}

.topOrgLabel {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .6;
    white-space: nowrap;
}

.topOrgCurrent {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    text-align: left;
}

.topOrgCaret {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: .7;
}

.topOrgMenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    max-width: 280px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 30px rgba(0,0,0,.12);
    display: none;
    z-index: 2000;
}

html[data-theme="dark"] .topOrgMenu {
    background: rgba(24,24,28,.92);
    border-color: rgba(255,255,255,.10);
}

.topOrgMenu.is-open {
    display: block;
}

.topOrgOption {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 0;
    background: transparent !important;
    color: inherit;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    box-shadow: none;
}

.topOrgOption:hover {
    background: rgba(0,0,0,.06) !important;
}

html[data-theme="dark"] .topOrgOption:hover {
    background: rgba(255,255,255,.08) !important;
}

.topOrgOption.is-active {
    background: rgba(0,0,0,.08) !important;
}

html[data-theme="dark"] .topOrgOption.is-active {
    background: rgba(255,255,255,.10) !important;
}

.topOrgOptionName {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topOrgOptionCheck {
    font-size: 12px;
    opacity: .7;
}

@media (max-width: 900px) {
    .topOrgSwitcher {
        display: none;
    }
}














/* =========================
   SNIPE POLISH PASS
   ========================= */


/* Headings and copy inside app */
.appView h2,
.appView h3,
.appView h4 {
    margin: 0 0 14px;
    color: var(--text);
}

.appView p,
.appView label {
    color: var(--muted);
}

/* Tab bar */
.tabBar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
    justify-content: flex-start;
}

.tabBtn {
    margin: 0;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--btn-bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    transition: all .2s ease;
}

.tabBtn:hover {
    background: var(--btn-bg-hover);
    transform: translateY(-1px);
}

.tabBtn.active {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
}

/* Tab panels */
.tabContent {
    display: none;
    text-align: left;
}

.tabContent.active {
    display: block;
}

/* Rich text editor block */
#mbedTextEditor,
.notesArea {
    min-height: 180px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--input-border);
    background: rgba(255,255,255,.85);
    color: var(--text);
    text-align: left;
    box-sizing: border-box;
}

html[data-theme="dark"] #mbedTextEditor,
html[data-theme="dark"] .notesArea {
    background: rgba(0,0,0,.18);
}

/* Toolbar */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.toolbar .format-btn {
    margin: 0;
    padding: 8px 12px;
    min-width: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--btn-bg);
    color: var(--text);
}

.toolbar .format-btn:hover {
    background: var(--btn-bg-hover);
}

/* Output result */
#mbedOutput,
.outputBox {
    margin-top: 22px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.55);
    border: 1px solid var(--border-soft);
    text-align: left;
}

html[data-theme="dark"] #mbedOutput,
html[data-theme="dark"] .outputBox {
    background: rgba(255,255,255,.06);
}

/* Snipe list */
#snipeList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
    text-align: left;
}

.snipeItem {
    padding: 18px 18px 16px;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.snipeItem strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    color: var(--text);
}

.snipeItem em {
    display: inline-block;
    margin-bottom: 12px;
    font-style: normal;
    font-size: 12px;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--muted);
}

.snipeItem a,
.snipeItem button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 6px 8px 0 0;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    text-decoration: none;
}

.snipeItem a {
    background: var(--btn-bg);
    color: var(--text);
}

.snipeItem button {
    background: var(--accent);
    color: #fff;
}

.snipeItem .deleteSnipeBtn {
    background: rgba(165, 54, 54, .88);
}

/* Profile / settings / modal polish */
.snipeModal {
    padding: 20px;
    background: rgba(0,0,0,.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.snipeModal-content {
    width: min(680px, calc(100vw - 40px));
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--panel-bg-strong);
    color: var(--text);
    box-shadow: var(--shadow-lg);
}

.snipeModal-content h3 {
    margin-top: 0;
}

.snipeModal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}