@import url("fonts.css");
@import url("main.css");
/* @import url("actors.css"); */

#view-graphical {
	width: 100vw;
	height: 100vh;
	grid-template-areas:
		"tbr tbr tbr"
		"sbr man man"
		"sbr bbr bbr";
	grid-template-columns: min-content 1fr;
	grid-template-rows: min-content 1fr min-content;
    display: grid;
}

#view-graphical.disabled {
    display: none;
}

#graphical-sidebar {
	grid-area: sbr;
	background-color: var(--dark-color);
	border-right: 3px ridge var(--bright-color);
	z-index: 1;
}
#graphical-topbar {
	grid-area: tbr;
	background-color: var(--dark-color);
	border-bottom: 3px ridge var(--bright-color);
	z-index: 1;
}
#graphical-bottombar {
	grid-area: bbr;
	background-color: var(--dark-color);
	border-top: 3px ridge var(--bright-color);
	z-index: 1;
}
#graphical-main {
	grid-area: man;
	background-color: #444;
	/* z-index: -1; */
}

#view-graphical {
	user-select: none;
    -webkit-user-select: none;
}

#graphical-scalable {
  /* position: absolute; */
  background-image: url(../assets/dashgrid.svg);
  width: 100%;
  height: 100%;
  --scalar-tr-x: 0px;
  --scalar-tr-y: 0px;
  --scalar-scale: 1.0;
  background-size: calc(100px / var(--scalar-scale));
  background-position: var(--scalar-tr-x) var(--scalar-tr-y);
}

/* #graphical-scalable > div.background {
  position: absolute;
  background-image: url(/assets/dashgrid.svg);
  width: 100%;
  height: 100%;
  transform-origin: auto;
  z-index: -1;
} */

#graphical-scalable > div {
    /* transform-origin: center; */
	transform:
        translate(-50%, -50%)
        translate(var(--scalar-tr-x), var(--scalar-tr-y))
        scale(calc(1/var(--scalar-scale)))
        translate(50%, 50%);
}

#graphical-scalable > .node {
	padding: 5px;
	background-color: black;
	/*position: absolute;
	--pos-x: 0px;
	--pos-y: 0px;*/
	border-radius: 10px;
	border: 3px outset white;
	box-sizing: border-box;
	width: 500px;
	--dialogue-scroll: calc(-1.0 * var(--scalar-tr-y));
	/* --message-menu-size: 100px; */
	padding-right: 15px;
    padding-left: 15px;
}

/* CORRU STUFF */

.dialogue-message, .dialogue-text, .dialogue-portrait {
	box-sizing: border-box;
	transform: translateX(0px); /*even though this does nothing we set a transform to keep parity with corru*/
}

.dialogue-portrait[data-hideportrait='true'] {
	display: none !important;
}

.dialogue-message, .dialogue-actor {
    --color: var(--bright-color);
    --background: var(--dark-color);
    font-size: 1rem;
    letter-spacing: 0.25px;
    color: var(--color);
    margin: 0.3rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    /* transform: translateX(-120%); */
    /* transition: transform 400ms ease-in-out; */
}

.dialogue-message .dialogue-text {
    flex-basis: 70%;
    flex-grow: 1;
    display: block;
    border: 1px solid;
    border-color: inherit;
    padding: 0.6em;
    margin: 0.6em;
    background: var(--background);
    color: var(--color);
    position: relative;
    word-break: break-word;
    line-height: 1.1;
}  
  
.dialogue-text p {
    word-break: break-word;
    margin: 0.6rem 0;
}

.dialogue-text p:last-child {
    margin-bottom: 0;
}

.dialogue-text p:first-child {
    margin-top: 0;
}

.dialogue-portrait {
    flex-basis: 15%;
    border-radius: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border-color: inherit;
    background-size: cover;
    background-position: center;
}

.dialogue-portrait::after {
    content: "";
    display: block;
    padding-top: 93%;
    width: 100%;
    border-radius: 100%;
    background-image: var(--background-image);
    background-size: cover;
    border-color: inherit;
    border-style: double;
}

.dialogue-portrait::before {
    content: "";
    position: absolute;
    right: -0.95em;
    height: calc(100% - 5em);
    width: 50%;
    border: 0.32rem double;
    border-left: unset;
    border-top-left-radius: 100%;
    border-bottom-left-radius: 100%;
    border-color: var(--color);
    z-index: -1;
    border-color: inherit;
}

.from-player.dialogue-message .dialogue-text {
    text-align: right;
    align-items: flex-end;    
}

.from-player.dialogue-message, .dialogue-actor {
    /* transform: translateX(120%); */
    transform-origin: right;
}

.from-player .dialogue-portrait, .dialogue-actor .dialogue-portrait {
    order: 2;
    z-index: -1;
}

.from-player .dialogue-portrait:before, .dialogue-actor .dialogue-portrait:before {
    right: unset;
    left: -0.95em;
    border-top-left-radius: unset;
    border-bottom-left-radius: unset;
    border-top-right-radius: 100%;
    border-bottom-right-radius: 100%;
}

.dialogue-menu {
    opacity: 0.5;
    pointer-events: none;
}

/* 
.textarea {
  background: #86efac;
  color: #000000;
  border: 3px solid #000000;
  border-radius: 0;
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  transition: all 0.1s ease;
  width: 100%;
  resize: none;
  box-shadow: 4px 4px 0 #000000;
}

.textarea:focus {
  box-shadow: 1px 1px 0 #000000;
  transform: translate(3px, 3px);
}

.textarea::placeholder {
  color: #444444;
} */



/* definition box */
#definition-box {
    position: fixed;
    top: 0;
    left: 0;
    max-width: 45vw;
    z-index: 10000;
    transform: 
        translate(
            calc(  (var(--x) * 1px)   +   ((var(--xFlip) * (100% + 2em)) + 1em)  ), 
            calc(  (var(--y) * 1px)   +   ((var(--yFlip) * (100% + 2em)) + 1em)  )
        );
    pointer-events: none;
    transition: opacity 400ms ease-in-out, transform 50ms linear;
    background: var(--dark-color);
    color: var(--bright-color);
    padding: 0.63rem;
    font-family: spacemono;
    font-size: 0.75rem;
    border: 1px dashed;
    line-height: 1.2em;
}

#definition-box.slow {
    transition: opacity 400ms ease-in-out, transform 250ms linear;
}

#definition-box:not(.active) {
    opacity: 0;
}

#definition-box[for="regular"] {
    white-space: pre-line;
}

#definition-box[for="action"] {
    padding: 0.75em;
    color: var(--neutral-color);
}

#definition-box[for="tile"] {
    opacity: 0;
    background: #000000d1; /* cheating but the UI being nice is imore important */
    padding: 0;
    border: unset;
}

.mui-active #definition-box[for="tile"].active {
    opacity: 1;
}

#definition-box[for="status"] {
    padding: 0;
    border: unset;
}

#definition-box[for=status] .actiondef-statuses {
    margin-top: 0;
    line-height: 1.5em;
}


.branch-dialogue-menu {
	padding-bottom: 1em;
	border-bottom: 2px solid white;
	display: flex;
	justify-content: center;
}

.branch-dialogue-menu > button {
    flex: 1;
	background-color: transparent;
	font-family: "Space Mono";
	border: none;
	color: #aaa;
	/* padding: 15px 32px; */
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 1.5em;
	cursor: pointer;
}

.branch-dialogue-menu > button:hover {
	color: #f0f;
}

/* .response-container {
	padding-bottom: 1em;
	border-bottom: 2px solid white;
} */

/* .dialogue-message.message-selected {
	border-left: 2px solid yellow;
} */

.dialogue-message.message-selected::before {
    content: "";
    background: yellow;
    position: absolute;
    left: -10px;
    top: -10px;
    bottom: -10px;
    border-left: 2px solid yellow;
}

/* .message-menu {
	background: #222;
	width: var(--message-menu-size);
	height: 100%;
	position: absolute;
	right: calc((-1 * var(--message-menu-size)) - 10px);
	border: 1px solid white;
	border-radius: 5px;
}

.message-menu > input[type=text] {
	width: calc(100% - 5px);
	padding: 0;
	margin: 0;
} */




.dialogue-menu {
    opacity: 0.5;
    pointer-events: none;
}

.dialogue-actor .dialogue-portrait {
    flex-basis: 10%;
}
  
.dialogue-options {
    flex-basis: 70%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: right;
    border: 0.32rem double;
    padding: 0.25rem;
    margin: 0.25rem;
    background: var(--dark-color);
    border-color: inherit;
    text-align: center;
}  
  
.dialogue-options .reply {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--bright-color);
    color: var(--dark-color);
    padding: 0.32rem;
    margin: 0.32rem;
    border: 0.32rem double;
    border-color: inherit;
    transition: opacity 200ms ease-in-out, transform 200ms ease-in-out;
}

.reply[read="hidden"] { /* the read state is hidden - meaning it's a dynamic option */
    border-radius: 20px;
    border-bottom-style: ridge;
    border-bottom-color: var(--neutral-color)
}

.reply[read="read"] { /* the read state is true - meaning it's been read already */
    border-top-right-radius: 20px;
    border-right-color: var(--obesk-color);
}

.reply[read="unread"] { /* the read state is false - meaning it's not read yet */
    border-top-left-radius: 20px;
    border-left-color: var(--friend-color);
    box-shadow: -5px 0px 5px var(--friend-color)
}

.reply[read="within"] { /* the read state is kinda false - meaning it has something within that hasn't been used yet */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;  
    box-shadow: 0 -2px 10px var(--friend-color);
    border-right-color: var(--obesk-color);
    border-left-color: var(--friend-color);
}

/* certain "changeread" replies like moth's questions get special styling to signify they're a little unique*/
.reply.changeread[read] {
    border-radius: 20px;
    border: 5px double;
    border-bottom-style: ridge;
}
.reply.changeread[read="read"] {border-bottom-color: var(--obesk-color); border-bottom-width: 3px;}
.reply.changeread[read="unread"], .reply.changeread[read="within"] {border-bottom-color: var(--friend-color)}

/* .dialogue-options .reply:hover {
    transform: translateY(-0.32rem);
} */

.dialogue-options .reply::after {
    display: block;
    font-size: 0.63rem;
}
  
.dialogue-options .reply.end-reply {
    background: var(--dark-color);
    color: var(--bright-color);
}

.dialogue-options .reply.end-reply::after {
    content: attr(endtext);
}

.dialogue-options .reply.fake-end-reply {
    background: #303;
    color: var(--bright-color);
    border-radius: 8px;
}

.dialogue-options .reply.fake-end-reply::after {
    content: attr(endtext);
}

.response-container .dialogue-portrait {
    order: 0;
}

.response-container .dialogue-portrait::before {
    right: unset;
    left: unset;
    top: unset;
    bottom: -0.95em;
    border-top-left-radius: 100%;
    border-top-right-radius: 100%;
    border-bottom-left-radius: unset;
    border-bottom-right-radius: unset;
    content: "";
    position: absolute;
    height: 50%;
    width: calc(100% - 5em);
    border: 0.32rem double;
    border-bottom: unset;
    z-index: -1;
    border-color: inherit;
}

.response-container .dialogue-portrait::after {
    content: "";
    display: block;
    padding-top: 0%;
    height: 37px;
    width: 37px;
    border-radius: 100%;
    background-image: var(--background-image);
    background-size: cover;
    border-color: inherit;
    border-style: double;
}

.response-container .dialogue-actor {
    flex-direction: column;
    align-items: end;
}

input[type=text] {
    font-family: spacemono;
}

textarea.reply-edit {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	resize: none;
	display: none;
	border-radius: 0;
	background: #1e1e1e;
	color: #ce9178;
}

textarea.reply-edit.active {
	display: block;
}

.dialogue-reply-container {
    position: relative;
}


.branch-menu {
	padding-bottom: 1em;
	border-bottom: 2px solid white;
	display: flex;
	justify-content: center;
}



.branch-menu > input[type=text] {
	width: calc(100% - 5px);
	padding: 0;
	margin: 0;
}


input.name-edit {
	resize: none;
	border-radius: 0;
	background: #1e1e1e;
	color: #ce9178;
}

.branch-response-menu {
	/* padding-bottom: 1em;
	border-bottom: 2px solid white; */
	display: flex;
	justify-content: center;
}

.branch-response-menu > button {
    flex: 1;
	background-color: transparent;
	font-family: "Space Mono";
	border: none;
	color: #aaa;
	/* padding: 15px 32px; */
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 1.5em;
	cursor: pointer;
}

.branch-response-menu > button:hover {
	color: #f0f;
}


.response-reply-menu {
	/* padding-bottom: 1em;
	border-bottom: 2px solid white; */
	display: flex;
	justify-content: center;
}

.response-reply-menu > button {
    flex: 1;
	background-color: transparent;
	font-family: "Space Mono";
	border: none;
	color: #aaa;
	/* padding: 15px 32px; */
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 1.5em;
	cursor: pointer;
}

.response-reply-menu > button:hover {
	color: #f0f;
}

#graphical-topbar > button {
	background-color: transparent;
	font-family: "Space Mono";
	border: 1px solid white;
	color: #aaa;
	/* padding: 15px 32px; */
	text-align: center;
	text-decoration: none;
	display: inline-block;
	/* font-size: 1.5em; */
	cursor: pointer;
}

#graphical-topbar > button:hover {
	color: #f0f;
}



textarea.dialogue-edit {
	/* position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0; */
	resize: none;
	border-radius: 0;
	background: #1e1e1e;
	color: #ce9178;
    flex-grow: 1;
    flex-basis: 70%;
}

input.actor-edit {
    /* position: absolute; */
	/* top: 0; */
	/* left: 0;
	right: 0; */
	/* bottom: 0; */
	resize: none;
	border-radius: 0;
	background: #1e1e1e;
	color: #ce9178;
}

.edit-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.edit-overlay.active {
    display: flex;
    flex-direction: column;
}

.flag-symbols {
    position: absolute;
    left: calc(100% + 30px);
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-around;
}

.flag-symbols > span {
    display: inline-block;
    border: 1px solid white;
    background: black;
    border-radius: 10%;
    width: 25px;
    height: 25px;
}

.flag-symbols > span[data-symbol="autoAdvance"] {
    background: url(../assets/symbols/autoadvance.svg);
}

.flag-symbols > span[data-symbol="wait"] {
    background: url(../assets/symbols/wait.svg);
}


.response-edit-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 55px;
    bottom: 0;
}
.response-edit-overlay.active {
    display: flex;
    flex-direction: column;
}

.response-container .dialogue-portrait {
    z-index: 1;
}
.response-container .dialogue-options {
    z-index: 1;
}
.response-container .response-edit-overlay {
    z-index: 2;
}

.response-container .dialogue-actor {
    position: relative;
}