:root {
    --main-bg-color: #000000;
    --title-text-color: #FFFFFF;
    --info-bg-color: #844FBA;
    --error-bg-color: #FF8484;
    --display-font-family: 'Open Sans', sans-serif;
    --code-font-family: 'Source Code Pro', monospace;
}

h1 {
    font-family: var(--display-font-family);
    font-weight: 700;
}
.wrapper {
    display: grid;
    grid-gap: 10px;
    grid-template-columns: auto 1fr 1fr;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
            "title . infos"
            "details details details"
            "main main main"
            "footer footer footer";;
    width: 100vw;
    height: 100vh;
}

.title {
    background: var(--main-bg-color);
    color: var(--title-text-color);
    grid-area: title;
}

.footer {
    background: var(--main-bg-color);
    grid-area: footer;
}
.footer a {
    font-family: var(--display-font-family);
    font-weight: 300;
    color: var(--title-text-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer img {
    padding-right: 5px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.infos {
    background: var(--info-bg-color);
    color: var(--title-text-color);
    grid-area: infos;
    justify-self: end;
    padding-left: 20px;
    padding-right: 20px;
}
.details {
    background: var(--main-bg-color);
    grid-area: details;
    font-family: var(--display-font-family);
    font-weight: 300;
    color: var(--title-text-color);
}

.details summary {
    display: none;
}

.details dd {
    margin-bottom: 1em;
}

.details dt {
    font-weight: 500;
}

.details a {
    color: white;
}

.main {
    background: var(--main-bg-color);
    grid-area: main;
    display: grid;
    grid-gap: 0;
    grid-template-columns: 1fr 0.2fr 1fr;
    grid-template-rows: 1fr auto;
    grid-template-areas:
            "input-container arrow hcl-editor"
            "json-error arrow hcl-error";
    padding: 40px;
    min-height: 0;
}

.main > * {
    background-color: white;
    margin-top: 0;
    margin-bottom: 0;
}

.editor {
    height: auto;
    font-family: var(--code-font-family);
    font-weight: 400;
    font-size: 14px;
}
.input-container {
    grid-area: input-container;
    position: relative;
    background-color: white;
}

.json-editor {
    width: 100%;
    height: 100%;
    border: none;
    resize: none;
    outline: none;
    padding: 1em;
    box-sizing: border-box;
    font-family: var(--code-font-family);
    font-weight: 400;
    font-size: 14px;
}

.copy-button {
    position: absolute;
    top: 0.3em;
    right: 1.2em;
    background: var(--info-bg-color);
    color: var(--title-text-color);
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-family: var(--display-font-family);
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease;
    z-index: 10;
}

.copy-button:hover,
.copy-button:focus {
    background: #9a6ac9;
    outline: none;
}

.copy-button:active {
    background: #7d52a8;
}
.json-error {
    grid-area: json-error;
}

.hcl-editor {
    grid-area: hcl-editor;
    position: relative;
    background-color: white;
    /* overflow: auto; */
    overflow: hidden;
    min-height: 0;
}

.hcl-editor pre {
    margin: 0;
    padding: 1em;
    overflow: auto; 
    height: 100%;   
    box-sizing: border-box;
}

.hcl-error {
    grid-area: hcl-error;
    position: relative;
}
.error {
    background-color: var(--error-bg-color);
    text-align: center;
    display: none;
}

.arrow {
    grid-area: arrow;

    background-color: var(--main-bg-color);
    color: var(--info-bg-color);

    justify-self: center;
    align-self: center;

    font-size: 10vw;
    font-family: var(--display-font-family);
    font-weight: 900;
}

.title,.infos {
    margin: 0;
}

/* Align PrismJS theme to our styling */
pre[class*=language-] {
    background-color: white;
}