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

body {
  background-image: url('/static/images/background.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
}

/* Add a test div to see if the logo works as a regular element */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 200px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
}

.warning-text {
    color: crimson;
    font-weight: bold;
    margin-top: 10px;
    display: none;
}

input, textarea, select {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    width: 50%;
}

/* Remove spinners from number inputs globally */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Password input wrapper and toggle button styles */
.password-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    width: 100%;
    padding-right: 45px !important;
    box-sizing: border-box;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    color: #666;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    z-index: 100;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.password-toggle-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.password-toggle-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.password-toggle-btn:active {
    background-color: #e0e0e0;
}

/* Ensure wrapper takes full width when needed */
.form-group .password-input-wrapper,
.form-field-tooltip .password-input-wrapper {
    width: 100%;
    display: block;
}

label {
    width: auto;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.title_label {
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 18px;
}

.content-overlay {
    margin: auto;
    padding: 20px; /* vertical */
    background-color: rgba(160, 160, 160, 0.9);
    border-radius: 5px;
    max-width: 400px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.form-container {
    max-width: 60%;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-weight: bold;
    background: white;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.fancy-button {
    font-weight: bold;
    background: #636363 !important;
    color: white !important;
    padding: 10px 20px;
    border: 2px solid #4d4d4d !important;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none !important;
}

.fancy-button:hover {
    background: #4d4d4d !important;
    border-color: #3d3d3d !important;
    color: white !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
    text-decoration: none !important;
}

.fancy-button:active {
    background: #3d3d3d !important;
    border-color: #2e2e2e !important;
    color: white !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateY(1px);
    text-decoration: none !important;
}

.fancy-button:visited {
    background: #636363 !important;
    color: white !important;
    text-decoration: none !important;
}

.fancy-button:link {
    background: #636363 !important;
    color: white !important;
    text-decoration: none !important;
}

.fancy-button:disabled {
    background-color: #d3d3d3;
    color: #a9a9a9;
    cursor: not-allowed;
}

.fancy-dropdown {
    padding: 10px;
    border-radius: 5px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fancy-dropdown:hover {
    background-color: #e0e0e0;
    border-color: #888;
}

h1, h2, h3, h4, h5, h6 {
    text-align: center;
}

.centered-cell {
    text-align: center;
}

.help-icon {
    font-weight: bold;
    cursor: pointer;
}

/* Checkbox styles - grouped together */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.custom-checkbox input[type="checkbox"] {
    display: none;
}

.custom-checkbox .fancy-checkbox {
    width: 25px;
    height: 25px;
    background-color: #d3d3d3;
    border-radius: 10%;
    border: 2px solid #999;
    display: inline-block;
    position: relative;
    margin-right: 10px;
    flex-shrink: 0;
}

.custom-checkbox input[type="checkbox"]:checked + .fancy-checkbox {
    background-color: black;
    border-color: #d3d3d3;
}

.custom-checkbox input[type="checkbox"]:checked + .fancy-checkbox::after {
    content: '\2714';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
}

.checkbox-label {
    font-size: 16px;
}
/* End of checkbox styles */

.fancy-radio input[type="radio"] {
    display: none;
}

.fancy-radio-label {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #ccc;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.fancy-radio input[type="radio"]:checked + .fancy-radio-label {
    background-color: #333;
    color: white;
    border-color: #333;
}

.radio-group {
    display: flex;
    flex-direction: column;
}

.fancy-radio {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}


.countdown {
    color: #ff0000;
    font-weight: bold;
    font-size: 1.2em;
    text-align: center;
    margin-top: 20px;
}

.fancy-edit {
    padding: 10px 12px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    transition: all 0.3s ease;
    outline: none;
    height: 40px; /* Increased height */
    line-height: 20px; /* Helps with vertical centering of text */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.fancy-edit:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.fancy-edit:hover {
    border-color: #999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}