/* FONT SETTINGS */
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/Outfit-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* GLOBAL SETTINGS */
:root {
    --color-light: #f0e4c0;              /* Warmes Creme-Gold für Texte */
    --color-accent: #c8975a;             /* Metallic-Gold für Buttons & Akzente */
    --color-bg: #0d1526;                 /* Tiefes Navy-Blau (Consciencia) */
    --color-bg-container: #131f35;       /* Dunkles Navy für Container */
    --color-bg-field: #1a2840;           /* Navy für Inputs/Felder */
    --color-label-light: #d8ccaa;        /* Gedämpftes Creme-Gold für Labels */
    --color-accent-hover: #c8975ae6;     /* Metallic-Gold Akzent (semi-transparent) */
    --color-logo-red: #8a6030;           /* Dunkles Gold für Ränder */
}
* {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: var(--color-label-light);
}

/* Resets input buttons, text areas */
input, button, textarea {
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    background: none;
}

html {
    touch-action: manipulation; /* Disable double tap zoom */
}


/* -------------------- GUESTBOOK -------------------- */

/* backgroud */
body {
    background: var(--color-bg);
    touch-action: manipulation;
    margin: 0;
    display: flex;
    justify-content: center;
}

/* title */
.gbtitle {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-light);
    margin: 0;
}

#logo {
  transition: transform 0.3s ease;
}

/* DVD-Logo Bewegung + Rotation */
@keyframes infinite-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#logo.rotating {
  animation: infinite-rotate 3s linear infinite;
}

#logo.bouncing {
  position: fixed;
  top: 100px;
  left: 100px;
  width: 30px;
  height: 30px;
  z-index: 9999;
}

/* overall input container*/
.container {
    flex: 1;
    width: 100%;
    margin-top: 50px;
}
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}
@media (min-width: 600px) {
    .container {
        max-width: 550px;
    }
}

/* input and message container */
.messagesContainer {
    margin: 0px;
    padding: 0px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* input and message container */
.inputContainer {
    margin-top: 0px;
    margin-bottom: 16px;
    background: var(--color-bg-container);
    padding: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);

}

/* input and message container */
.imprintContrainer {
    margin: 10px;
    background: var(--color-bg-container);
    padding: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* explaination message */
.gbmsg {
    text-align: center;
    font-size: 15px;
    margin: 0;
    margin-bottom: 10px;
    color: var(--color-light);
}

/* input lines format */
.line {
    display: flex;
    align-items: center;
    justify-content: center;
}

.messageWithPreview {
    display: flex;
    width: 100%;
    align-items: stretch;
    position: relative;
}

.imagePreviewWrapper {
    width: 25%;
    max-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-top: 2px solid var(--color-bg);
    border-right: 2px solid var(--color-bg);
    background-color: var(--color-bg-field);
    height: auto;
}

.imagePreview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


span#progressBar {
    border-bottom: 2px solid var(--color-bg);
    border-left: 2px solid var(--color-bg);
    border-right: 2px solid var(--color-bg);
}

/*title line*/
.titelLine {
    margin-top: 0px;
}

/*bottom line*/
.bottomLine {
    margin-bottom: 0px;
}

/* disable focus outlines */
.input:focus,
.inputMessage:focus {
    outline: none;
    box-shadow: none;
}

/* fixed fields */
.input, .uploadButton, .clearUploadButton, .countryButton, .cancelUploadButton{
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 10px;
    box-sizing: border-box;
    background-color: var(--color-bg-field);
    transition: background-color 0.3s;
    resize: none;
}

.input {
    border-top: 2px solid var(--color-bg);
    border-left: 2px solid var(--color-bg);
    border-right: 2px solid var(--color-bg);
}

 .uploadButton{
    border-top: 2px solid var(--color-bg);
    border-bottom: 2px solid var(--color-bg);
    border-left: 2px solid var(--color-bg);
}

.countryButton {
    flex-grow: 0;
    width: 44px;
    min-width: 44px;
    padding: 8px;
    border-top: 2px solid var(--color-bg);
    border-right: 2px solid var(--color-bg);
}

.globeIcon {
    width: 20px;
    height: 20px;
    display: block;
    color: var(--color-label-light);
}

.clearUploadButton {
    border-top: 2px solid var(--color-bg);
    border-bottom: 2px solid var(--color-bg);
    border-left: 2px solid var(--color-bg);
}

.cancelUploadButton {
    border-left: 2px solid var(--color-bg);
}

.charCounter {
    position: absolute;
    bottom: 5px;
    right: 8px;
    font-size: 10px;
    color: var(--color-label-light);
    opacity: 0.45;
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}

.charCounter span {
    font-size: 10px;
}

/* vertical resize fields (message textbox) */
.inputMessage {
    height: 80px;
    resize: none;
}


/* FILE UPLOAD */
.progressContainer {
    position: relative;
    flex-grow: 1;
    height: 20px;
    background-color: var(--color-bg-field);
    border-radius: 5px;
    overflow: hidden;
    margin-right: 5px;
    margin-left: 5px;
}

.progressBar {
    height: 100%;
    background-color: var(--color-accent-hover);
    width: 0;
    transition: width 0.3s;
}

#progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-label-light);
    font-weight: bold;
    pointer-events: none;
}

.cancelUploadButton {
    width: 100px;
    flex-grow: 0;

}

.uploadButtonImage {
    width: 25px; 
    height: 20px;
}

.uploadButtonText {
    margin-right: 5px;
}


/* SEND*/
.sendbutton {
    width: 40%;
    height: 40px;
    color: var(--color-bg);
    font-weight: bold;
    background-color: var(--color-accent);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    border: 2px solid var(--color-bg);
}

.sendbutton-disabled {
    background-color: #1c2d4a;
    color: var(--color-label-light);
    cursor: not-allowed;
}

.sendbutton-disabled:hover {
    background-color: #243660;
}

.button {
    cursor: pointer;
}

/* -------------------- HEADER -------------------- */

.header-banner {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 50px;
    border-bottom: 1px solid var(--color-logo-red);
    background-color: var(--color-bg);
    text-align: center;
    z-index: 3;
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.header-banner p {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-light);
    padding-left: 10px;
}

.home-icon-container {
    position: absolute;
    left: 10px;
    display: flex;
    align-items: center;
}

.home-icon {
    display: flex;
    width: 25px;
    height: 25px;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.home-icon img {
    width: 15px;
    height: 15px;
    display: block;
}

.question-icon-container {
    position: absolute;
    right: 25px;
    display: flex;
    align-items: center;
}

.question-icon {
    display: inline-block;
    font-weight: bold;
    border: none;
    padding: 5px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    font-size: 16px;
}

/* display menue */
#toggleMenu:checked ~ .menu {
    display: block;
}

#toggleMenu:checked + label.question-icon {
    color: var(--color-bg);
    font-weight: bold;
    background-color: var(--color-accent);
}

.menu {
    display: none;
    position: absolute;
    top: 35px;
    right: 0;
    background-color: Var(--color-bg-field);
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1;
    border-radius: 3px;
    width: 200px;
}

.menu p {
    line-height: 30px;
    cursor: pointer;
    padding-left: 12px;
}

/* remove underline from hyperlink */
.menu p a {
    font-size: 16px;
    color: inherit;
    text-decoration: none;
}


/* -------------------- COUNTRY -------------------- */

/* Container for Clear button and search field */
.searchContainer {
    display: flex;
    align-items: center;
    width: 210px;
    flex-grow: 1;
    position: sticky;
    top: 0;
    z-index: 2;
}

.clearCountryButton {
    box-sizing: border-box;
    font-size: 13px;
    background-color: var(--color-bg-field);
    align-items: center;
    padding: 8px 8px;
    border: none;
    border-bottom: 2px solid var(--color-accent-hover);  
    border-right: 2px solid var(--color-accent-hover);
}


/* The search field */
#countryFilter {
    box-sizing: border-box;
    width: 100%;
    font-size: 13px;
    padding: 8px 8px;
    border: none;
    background-color: var(--color-bg-field);
    border-bottom: 2px solid var(--color-accent-hover); 
}
  
/* The search field when it gets focus/clicked on */
#countryFilter:focus {border: 1px solid var(--color-label-light);}

.countrySelector {
    position: relative;
    display: inline-block;
}
  
/* Dropdown Content (Hidden by Default) */
.countryDropdown {
    display: none;
    font-size: 13px;
    position: absolute;
    background-color: var(--color-bg-field);
    min-width: 200px;
    max-height: 250px;
    overflow-y: auto;
    border: 2px solid var(--color-accent-hover);
    border-radius: 5px;
    z-index: 1;
    right: 0;
}
  
.countryDropdown a {
    padding: 8px 8px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid var(--color-bg-container);
    display: flex;
    align-items: center;
}

.show {
    display: block;
}

/* -------------------- MESSAGES -------------------- */

.messageContainer {
    display: flow-root;
}

.messageTitleLine {
    /* border-bottom: 1px solid var(--color-light); */
    display: flex;
    align-items: baseline;
    margin-bottom: 10px;
}

.messageWrapper {
    display: flex;
    flex-direction: column;
}

.messageNameFlagLine {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
    white-space: normal;
}

.messageName {
    color: #3b311a;
    font-weight: bold;
    display: block;
}

.messageFlag {
    width: auto;
    height: 0.8em;
}

.messageVerify {
    width: auto;
    height: 0.9em;
}

.messageDate {
    flex-grow: 1;
    font-size: 10px;
    padding-left: 4px;
    color: #7a6a50;
}

.deleteIcon {
    margin-left: auto;
    padding-left: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #b8a88a;
    transition: color 0.2s ease;
    line-height: 1;
}


.messageText {
    display: block;
    color: #3b311a;
}

.messageImage {
    display: block;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    margin-top: 5px;
}

.messageList {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.message {
    padding: 10px;
    background-color: #f5ead8;
    word-wrap: break-word;
    max-width: calc(100% - 20px);
    border-radius: 0px;
}

/* gap between messges */
.message + .message {
    margin-top: 8px;
}


/* TESTING */
.custom-alert {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
}

.custom-alert.hidden {
    display: none;
}

.custom-alert-box {
    background-color: var(--color-bg-container);
    padding: 30px 40px;
    border: 1px solid var(--color-logo-red);
    text-align: center;
    max-width: 70%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.custom-alert-box p {
    font-size: 18px;
    color: var(--color-light);
    margin-bottom: 20px;
}

.custom-alert-button {
    padding: 10px 20px;
    background-color: var(--color-accent);
    color: var(--color-bg);
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
}

/* -------------------- TOUCH -------------------- */

button, label.button, .deleteIcon {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

@media (hover: hover) {
    button:hover                                          { background-color: var(--color-accent); }
    .sendbutton:hover:not(.sendbutton-disabled)           { background-color: #d4a870; }
    .sendbutton-disabled:hover                            { background-color: #243660; }
    .clearUploadButton:hover,
    .countryButton:hover,
    .uploadButton:hover,
    .cancelUploadButton:hover,
    .clearCountryButton:hover                             { background-color: var(--color-accent-hover); }
    .custom-alert-button:hover                            { background-color: #d4a870; }
    .deleteIcon:hover                                     { color: #3b311a; }
    .menu p a:hover                                       { color: var(--color-label-light); }
}

