/* global css file: Each element in the app has access to this */
/* 
What is defined here:
    elements that should look alike globally
    classes that should look alike globally
*/
/* For faster searching of an element, a comment has to be created before each category with proper keywords */

/*
Variables for the global css.
To access them: var(<name>)
*/
:root {
    --text-color: whitesmoke;
    --background: black;
    --background-secondary: #1e1e1e;
    /* items are elements like buttons and inputs */
    --background-items: #494949;
    --background-items-hover: #5e5e5e;
    --text-hover-color: #494949;

    --border-radius: 10px;
    --border-color: #444;

    --spacing-xs: 0.25rem; 
    --spacing-sm: 0.5rem; 
    --spacing-md: 1rem; 
    --spacing-lg: 1.5rem; 
    
    --transition-fast: 0.15s ease;
}

/* Each browser has its unique default values which we want to reset to have a consistent layout across all browsers */
* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    /* #212121 */
    background: var(--background-secondary);
    color: var(--text-color);
    font-family: Arial, Helvetica, sans-serif;
}

.main {
    font-size: var(--spacing-lg);
    padding: 1rem;
}

/* Buttons, Forms, Submits, Textfields, Labels */
.content-box, .content-box-foldable {
    padding: var(--spacing-md);
}

button, input[type="submit"] {
    background: var(--background-items);
    color: var(--text-color);

    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);

    padding: 0.7rem 1rem;
    margin-top: var(--spacing-sm);

    cursor: pointer;

    transition: 
        background var(--transition-fast),
        transform var(--transition-fast);
}

button:hover, input[type="submit"]:hover {
    background: var(--background-items-hover);
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
textarea, select {
    width: 100%;
    background: var(--background-items);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem; font-size: 1rem;
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color)
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
  }

.feedback {
    margin-top: var(--spacing-sm);
    color: #ff8080;
}

/* Tables */

table {
    border-collapse: collapse;
    width: 100%;
  }
  
  td, th {
    border: 1px solid var(--border-color);
    text-align: left;
    padding: 0.75rem;
  }
  tr:nth-child(even) {
    background-color: var(--background-secondary);
  }


/* used in /routes/protected/hypixel */
.autocomplete-dropdown {
    position: absolute;
    background: var(--background-items);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

