/* Material Design Color Palette */
:root {
    --primary-color: #1976D2; /* Main primary color */
    --accent-color: #FF4081; /* Accent color */
    --background-color: #f5f5f5; /* Background color */
    --text-color: #333; /* Text color */
    --secondary-text-color: #757575; /* Secondary text color */
}

body {
    font-family: 'Roboto', sans-serif !important;
    background-color: var(--background-color) !important;
    color: var(--text-color) !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* This ensures the flex container takes at least the full height of the viewport */
}

.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    flex: 1; /* This makes the content take up the available space */
    padding: 20px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color) !important;
}

/* Form styling */
form {
    margin-top: 20px !important;
}

label {
    color: var(--secondary-text-color) !important;
}

/* Main label color when not focused */
input + label {
    color: var(--secondary-text-color) !important;
}

/* Label color when input is focused */
input:focus + label {
    color: var(--primary-color) !important;
}

/* Label color when input has error */
input:invalid + label {
    color: var(--accent-color) !important;
}

/* Example for a focused input field */
input:focus {
    border-bottom: 2px solid var(--primary-color) !important;
    box-shadow: 0 1px 0 0 var(--primary-color) !important;
}

input[type="text"], input[type="password"] {
    width: 100% !important;
    padding: 10px !important;
    margin: 8px 0 !important;
    box-sizing: border-box !important;
}

input[type="submit"], input[type="file"] {
    height: 50px !important;
}

button {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    padding: 10px 7px !important;
    border: none !important;
    cursor: pointer !important;
    height: auto !important;
}

button:hover {
    background-color: var(--accent-color) !important;
}

/* Cards styling */
.card {
    padding-top: 50px;
    padding-bottom: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s !important; /* Transition for transform */
}

.card-header {
    padding-top: 31px;
    padding-bottom: 17px;
}

.teal-text {
    color: var(--primary-color) !important;
}

.file-input-container {
    position: relative !important;
    display: inline-block !important;
    height: 56px !important;
}

.file-input-label {
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 2px;
    color: var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    height: 56px !important;
}

.file-input-label-text {
    margin-right: 8px; /* Adjust as needed */
}

.file-input-label:hover {
    background-color: var(--primary-color);
    color: #fff;
}

#fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.modal-content {
    background-color: var(--background-color) !important;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #ccc;
    width: 80%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.error, .success {
    color: var(--accent-color) !important;
    text-align: center;
}

.header-row {
    margin-top: 80px;
}

.footer-row {
    background-color: #fff;
    text-align: center;
    position: sticky;
    bottom: 0;
    width: 100%;
}

.center-align-vertically {
    display: flex;
    align-items: center;
}

input:not([type]),
input[type=text]:not(.browser-default),
input[type=password]:not(.browser-default),
input[type=email]:not(.browser-default),
input[type=url]:not(.browser-default),
input[type=time]:not(.browser-default),
input[type=date]:not(.browser-default),
input[type=datetime]:not(.browser-default),
input[type=datetime-local]:not(.browser-default),
input[type=tel]:not(.browser-default),
input[type=number]:not(.browser-default),
input[type=search]:not(.browser-default),
textarea.materialize-textarea {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--primary-color);
    border-radius: 0;
    outline: none;
    height: 3rem;
    width: 100%;
    font-size: 16px;
    margin: 0 0 8px 0;
    padding: 0;
    box-shadow: none;
    box-sizing: content-box;
    transition: border 0.3s, box-shadow 0.3s;
}

/* Focus state for input fields */
input:focus,
textarea.materialize-textarea:focus {
    border-bottom: 2px solid var(--primary-color) !important;
    box-shadow: 0 1px 0 0 var(--primary-color) !important;
}

/* Change label color when input is focused */
input:focus + label,
textarea.materialize-textarea:focus + label {
    color: var(--primary-color) !important;
}

/* Valid input styling */
input.valid,
textarea.materialize-textarea.valid {
    border-bottom: 1px solid var(--primary-color) !important;
    box-shadow: 0 1px 0 0 var(--primary-color) !important;
}

/* Checkbox styling */
[type="checkbox"]:checked + span:not(.lever):before {
    top: -4px;
    left: -5px;
    width: 12px;
    height: 22px;
    border-top: 2px solid transparent;
    border-left: 2px solid transparent;
    border-right: 2px solid var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
    transform: rotate(40deg);
    backface-visibility: hidden;
    transform-origin: 100% 100%;
}
