/* =========================
   FONTS
========================= */
@font-face {
    font-family: 'TitleFont';
    src: url('/static/fonts/title.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MainFont';
    src: url('/static/fonts/main.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* =========================
   GLOBAL RESET
========================= */
* {
    box-sizing: border-box;
}

html {
    font-family: 'MainFont', Arial, sans-serif;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    margin: 0;
    font-family: 'MainFont', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================
   COLORS
========================= */
.accent {
    color: #dfc186;
}

/* =========================
   LAYOUT WRAPPER
========================= */
.page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 10px;
    flex: 1;
    /* min-width: 590px; */
}

/* =========================
   CARD
========================= */
.card {
    width: 100%;
    max-width: 580px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;

    /* border-radius: 0 0 18px 18px; only bottom corners */

    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.18),
        0 6px 12px rgba(0, 0, 0, 0.10);

    margin-bottom: 40px;
}

/* =========================
   HEADER / FOOTER BASE
========================= */
.card-header,
.card-footer {
    position: relative;
    width: 100%;
    /* min-height: 230px; */

    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 20px;
}

.card-footer {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    min-height: 160px;

    margin-top: auto;
}

/* =========================
   GRID LAYOUT CONTAINER
========================= */
.header-grid,
.footer-grid {
    position: relative;
    width: 100%;
    /* height: 20px;
    min-height: 230px; */

    display: grid;
    place-items: center;
}

/* =========================
   DECOR LAYER
========================= */
.decor {
    position: absolute;
    inset: 0;
    height: 20px;
}

/* =========================
   TEXT
========================= */
h1 {
    position: relative;
    z-index: 2;

    font-family: 'TitleFont', serif;
    font-size: 42px;
    line-height: 1.2;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h2 {
    font-size: 28px;
    letter-spacing: 6px;
}

h3 {
    font-weight: 200;
    letter-spacing: 4px;
}

/* =========================
   DECOR IMAGES (SAFE POSITIONING)
========================= */
.frame-image1 {
    position: absolute;
    top: -59%;
    left: 1.5%;
    width: 125px;
    pointer-events: none;
}

.frame-image2 {
    position: absolute;
    transform: rotate(180deg);
    bottom: -250%;
    right: 1%;
    width: 125px;
    pointer-events: none;
}

.title-image {
    position: absolute;
    top: -9%;
    left: 67%;
    transform: translateX(-50%) rotate(10deg);
    width: 180px;
    pointer-events: none;
}

/* =========================
   BODY SECTIONS
========================= */
.card-body-idem,
.card-body-nejdem {
    background: #fff;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 10px;
    /* margin: 20px 30px; */
    width: 90%;

    margin-top: 20px;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* =========================
   PEOPLE LIST
========================= */
#people-container-idem {
    width: 100%;
}

#people-container-nejdem {
    width: 50%;
}

/* =========================
   ROWS
========================= */
.person-row {
    display: flex;
    /* gap: 10px; */


    /* margin: 10px 0;
    padding: 10px; */
    width: 100%;
    /* background: rgba(170, 48, 48, 0.6); */
    border-radius: 8px;
}

/* =========================
   INPUT FIELDS
========================= */
.field {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.field label {
    margin-bottom: 4px;
}

.field input {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* =========================
   BUTTONS
========================= */
button {
    background-color: #e4ded8;
    color: black;
    cursor: pointer;

    transition: transform 120ms ease, box-shadow 120ms ease;

    font-family: inherit;
    letter-spacing: 4px;
    font-weight: 200;

    -webkit-appearance: none;
    appearance: none;
}

button:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.submit-container {
    width: 100%;
    align-self: stretch;   /* IMPORTANT */
    
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px 0;

    margin-top: auto;

    background: #e2c58e;
}

.subcard {
    margin-top: auto;
    width: 50%;
    padding: 10px;
    display: flex;
    justify-content: center;
}

.subcard button {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: none;
}

/* =========================
   SUBMIT BUTTON
========================= */
.submit-btn {
    width: 40%;
    padding: 10px;

    border-radius: 12px;
    border: none;

    cursor: pointer;

    letter-spacing: 8px;
    font-size: large;
}

/* =========================
   FOOTER TEXT BAR
========================= */
.body-footer {
    height: 28px;
    background: #edece8;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    font-size: 14px;
}

.body-footer span {
    margin-right: 20px;
}

/* =========================
   ICONS
========================= */
.icon-svg {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.icon-svg:hover {
    color: #c86b6b;
}

/* =========================
   INPUT ERROR
========================= */
.input-error {
    border: 2px solid #e6a3a0;
    background-color: rgba(230, 163, 160, 0.1);
}

.person-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

/* default reset so we control widths manually */
.person-row .field {
    flex: 0 0 auto;
}

/* FIRST field = name (75%) */
.person-row .field:first-child {
    flex: 3; /* 3 parts */
}

/* SECOND field = intolerance (25%) */
.person-row .field:nth-child(2) {
    flex: 1; /* 1 part */
}

.name-field {
    width: 25%;
    /* background: green; */
}

.allergy-field {
    flex: 2;
    /* background: pink; */
}

/* .delete-field { */
    /* flex: 0 0 40px; */
    /* background: orange; */
    /* display: flex;
    justify-content: center;
    align-items: center; */
/* } */

.idem-btn,
.nejdem-btn,
.person-row {
    margin-top: 30px;
}

:focus-visible {
    outline: 2px solid #dfc186;
    outline-offset: 2px;
}

.idem-btn:focus-visible {
    outline: 2px solid #5f7f5a;
    outline-offset: 2px;
}

.nejdem-btn:focus-visible {
    outline: 2px solid #e6a3a0;
    outline-offset: 1px;
}

.submit-btn:focus-visible {
    outline: 2px solid #5f7f5a;
    outline-offset: 1px;
}

.thankyou-text {
    margin-left: 30px;
    font-size: 20px;
}

.slight-nudger {
    margin-top: 40px;
}

.frame-image2-fixer {
    bottom: -80%;
}