@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&display=swap');

@font-face {
    font-family: "RBNo3.1 Bold";
    src: local("RBNo3.1 Bold"),
        url("./Font/RBNo3.1-Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "RBNo3.1";
    src: local("RBNo3.1 Book"),
        url("./Font/RBNo3.1-Book.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* WEBSITE COLOR */
    --primary-color: #1b156d;
    --md-sys-color-primary: #0061a4;
    --md-sys-color-on-primary: #e00000;
    --md-sys-color-primary-container: skyblue;
    --md-sys-color-on-primary-container: #001d36;
    --md-sys-color-surface: #eef;
    --md-sys-color-surface-variant: #e0e2ec;
    --md-sys-color-on-surface: #1a1c1e;
    --rounded-corner: 8px;
    --logo-mark-width: 100px;
    --logo-subheading-width: 240px;
    --bottom-text-width: 240px;
    /* LOGO COLOR */
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'RBNo3.1', sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    margin: 0;
    min-height: 100vh;
    padding-bottom: 72px;
    overflow-x: hidden;
}

.navi {
    width: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.navi h1 {
    margin: 0;
    font-size: 1.4rem;
    color: white;
    font-family: 'RBNo3.1 Bold', 'Roboto', sans-serif;
}

.preview-card {
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, #f1f1f1 25%, transparent 25%),
        linear-gradient(-45deg, #f1f1f1 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f1f1f1 75%),
        linear-gradient(-45deg, transparent 75%, #f1f1f1 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    border-bottom: 1px solid var(--md-sys-color-surface-variant);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: 320px !important;
    user-select: none;
}

.logo-preview {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 4px;
    padding: 64px 0px;
    height: 210px !important;
}

#logo-container {
    cursor: pointer;
    transition: transform 0.3s ease;
    transform-origin: center;
}

#logo-container.zoomed {
    transform: scale(1.5);
}

.logo-mark-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--logo-mark-width);
    gap: 2px;
}

.kv-logo {
    width: var(--logo-mark-width);
    max-width: 100%;
    height: auto;
    display: block;
}

.logo-text-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    gap: 2px;
}

#logo-text-top,
#logo-text-subheading,
#logo-text-bottom {
    font-weight: 700;
    letter-spacing: 0px;
    color: #252060;
    font-family: 'RBNo3.1 Bold', 'Roboto', sans-serif;
    text-align: left;
    line-height: 80%;
}

#logo-text-bottom {
    display: block;
    width: var(--bottom-text-width);
    color: #e6302c;
    font-size: 30px;
    white-space: nowrap;
}

#logo-text-top {
    display: block;
    width: var(--logo-subheading-width);
    max-width: 100%;
    font-size: 36px;
    height: auto;
    min-height: 0;
    line-height: 0.8;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#logo-text-subheading {
    display: block;
    width: var(--logo-subheading-width);
    font-size: 14px;
    line-height: 1.1;
    white-space: nowrap;
    transform-origin: top center;
}

.text-divider {
    position: relative;
    width: 100%;
    border-bottom: 2px solid #252060;
    margin-bottom: 2px;
}

.text-divider::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #252060;
    right: 0;
    bottom: -3px;
}

#logo-text-mark-bottom {
    display: block;
    width: calc(var(--logo-mark-width) - 10px);
    transform: translateX(-5px);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0px;
    color: #e6302c;
    font-family: 'RBNo3.1 Bold', 'Roboto', sans-serif;
    line-height: 1.2;
    font-style: italic;
    text-align: left;
    transform-origin: top center;
    white-space: nowrap;
    padding-bottom: 2px;
    overflow: visible;
}

/* END OF LOGO PREVIEW */

.panel-container {
    max-width: 640px;
    width: 100%;
    margin: 10px auto;
    gap: 24px;
    display: flex;
    flex-direction: row;
    margin-top: 24px;
    align-items: flex-start;
}

.panel-container .controls {
    width: 60%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-container .description {
    width: 40%;
    text-align: justify;
    font-size: 0.9rem;
    color: grey;
}

.panel-container .description p {
    line-height: 1.4rem;
}

#text-input-top,
#text-input-bottom,
#text-input-subheading,
#text-input-mark-bottom {
    width: 100%;
    padding: 18px 24px;
    border-radius: var(--rounded-corner);
    border: 1px solid var(--md-sys-color-surface-variant);
    background-color: var(--md-sys-color-surface-variant);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#text-input-top {
    resize: none;
    min-height: 86px;
    line-height: 1.4;
    font-family: 'RBNo3.1 Regular', 'Roboto', sans-serif;
    font-weight: 400;
}

#text-input-top:focus,
#text-input-bottom:focus,
#text-input-subheading:focus,
#text-input-mark-bottom:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(27, 21, 109, 0.22);
}

#text-input-top:focus-visible,
#text-input-bottom:focus-visible,
#text-input-subheading:focus-visible,
#text-input-mark-bottom:focus-visible {
    border-color: var(--primary-color);
    outline: none;
}

.input-group label {
    font-weight: bold;
    display: block;
    text-align: left;
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--md-sys-color-on-surface);
}

.toggle-row {
    display: flex !important;
    justify-content: left;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    cursor: pointer;
}

.preview-toggle-group {
    width: 100%;
    margin-top: 16px;
}

.toggle-row span {
    font-size: 1rem;
    color: var(--md-sys-color-on-surface);
}

#advanced-toggle {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

#advanced-toggle:focus-visible {
    outline: none;
}

.advance-chevron {
    width: 18px;
    height: 18px;
    stroke: var(--primary-color);
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(0deg);
    transform-origin: 50% 50%;
    transition: transform 0.5s ease-in-out;
}

#advanced-toggle:checked+.advance-chevron {
    transform: rotate(180deg);
}

#advanced-toggle:focus-visible+.advance-chevron {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.advanced-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
    pointer-events: none;
}

.advanced-inputs.expanded {
    max-height: 640px;
    opacity: 1;
    pointer-events: auto;
}

.hidden {
    max-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.toggle-row {
    display: flex !important;
    justify-content: left;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.5s ease-in-out, color 0.5s ease-in-out;
}

.bg-swatches {
    border-radius: var(--rounded-corner);
    border: 1px solid var(--md-sys-color-surface-variant);
    display: flex;
    gap: 0px;
    flex-wrap: wrap;
}

.bg-swatch {
    width: 25%;
    height: 32px;
    border: none;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.1s;
    background-size: 8px 8px;
}

.bg-swatch:first-child {
    background-color: white;
    border-top-left-radius: var(--rounded-corner);
    border-bottom-left-radius: var(--rounded-corner);
}

.bg-swatch:last-child {
    background-color: black;
    border-top-right-radius: var(--rounded-corner);
    border-bottom-right-radius: var(--rounded-corner);
}

.bg-swatch[data-bg="solid-white"] {
    background-color: white;
}

.bg-swatch[data-bg="solid-black"] {
    background-color: black;
}

.bg-swatch[data-bg="checkered-white"] {
    background-color: white;
    background-image:
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.bg-swatch[data-bg="checkered-black"] {
    background-color: black;
    background-image:
        linear-gradient(45deg, #333 25%, transparent 25%),
        linear-gradient(-45deg, #333 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #333 75%),
        linear-gradient(-45deg, transparent 75%, #333 75%);
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.preview-card.bg-solid-white {
    background-color: white;
    background-image: none;
}

.preview-card.bg-solid-black {
    background-color: black;
    background-image: none;
}

.preview-card.bg-checkered-white {
    background-color: white;
    background-image:
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.preview-card.bg-checkered-black {
    background-color: black;
    background-image:
        linear-gradient(45deg, #333 25%, transparent 25%),
        linear-gradient(-45deg, #333 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #333 75%),
        linear-gradient(-45deg, transparent 75%, #333 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

#download-btn {
    width: 100%;
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    display: flex;
    align-items: left;
    justify-content: left;
    gap: 12px;
    border: none;
    padding: 18px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--rounded-corner);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    font-family: 'RBNo3.1 Bold', 'Roboto', sans-serif;
}

.download-icon {
    width: 20px;
    height: 20px;
    display: block;
}

#download-btn:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#download-btn:active {
    transform: scale(0.98);
}

.quick-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    padding: 24px;
    text-align: center;
    font-size: 0.75rem;
    color: #44474e;
    background: linear-gradient(180deg, #00000000, var(--md-sys-color-surface));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.quick-footer #link {
    display: flex;
    justify-content: center;
    width: 100%;
}

.quick-footer a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.quick-footer a:hover {
    opacity: 0.75;
}

@media (max-width: 660px) {
    .panel-container {
        flex-direction: column;
        width: calc(100% - 40px);
    }

    .panel-container .controls {
        width: 100%;
    }

    .panel-container .description {
        width: 100%;
    }
}