:root {
    --yellow-main: #F5B800;
    --yellow-hover: #E0A800;
}


html, body {
    animation: fadeIn 1.5s ease-in-out forwards;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    background-image: url('/assets/background.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
}

/* Header */
.header {
    text-align: center;
    opacity: 0;
    animation: fadeIn 2s ease-in-out forwards 0.75s;
}

.footer {
    text-align: center;
    opacity: 0;
    animation: fadeIn 2s ease-in-out forwards 2.25s;
}

.header-bismillah {
    width: 130px;
    height: auto;
    margin-top: 4em;
}

.footer-logo {
    width: 70px;
    height: auto;
    margin-bottom: 10px;
}

.header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3.5em;
    color: white;
    margin-top: 0.3em;
    margin-block-end: 0;
}

.header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1em;
    color: white;
    margin-block-start: 0;
    margin-block-end: 0;
}

.header h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.8em;
    color: white;
    margin-block-start: 0;
    margin-block-end: 0;
}

/* Form Styles */
form {
    padding: 0em;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    margin-top: 2em;
    margin-bottom: 1em;
    opacity: 0;
    animation: fadeIn 2s ease-in-out forwards 1.5s;
}

input, button, select {
    width: 100%;
    padding: 0.8em;
    margin: 0.5em 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Ensure the padding doesn't overflow */
}

/* Name Inputs */
.name-inputs {
    display: flex;
    justify-content: space-between;
    gap: 10px; /* Added gap between first name and last name */
}

.name-inputs input {
    width: 48%; /* Keep them responsive */
}

.attendance-options {
    margin-top: 1em;
    color: white;
    font-family: 'Cinzel', serif;
    font-size: 1em;
    /* Center the entire block */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.attendance-options label {
    display: block;
    margin-bottom: 0.5em;
    cursor: pointer;
}

.attendance-options input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: white;
    border: 2px solid #ccc;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    margin-right: 10px;
    vertical-align: middle;
}

.attendance-options input[type="radio"]:checked::before {
    content: "✓";
    position: absolute;
    top: -2px;
    left: 2px;
    font-size: 16px;
    color: var(--yellow-main);
}

#counterSection {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}
#counterSection.show {
    max-height: 500px;
    opacity: 1;
}

.counter-inputs {
    margin-top: 0em;
    margin-bottom: 1em;
}

/* Counter Styles */
.counter {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1em;
}

.counter-label {
    font-family: 'Cinzel', serif;
    font-size: 1em;
    color: white;
    margin-bottom: 1em;
    text-align: center;
    width: 100%;
    margin-top: 1em;
}

.counter button {
    background-color:var(--yellow-main);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    width: 40px;
    height: 40px;
    margin: 0 10px;
    padding: 0;
    line-height: 40px;
    text-align: center;
    vertical-align: middle;
}

.counter span {
    font-size: 2em;
    color: white;
    margin: 0 10px;
}

/* Submit Button */
button {
    background-color:var(--yellow-main);
    color: white;
    padding: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
}

button:active {
    background-color: var(--yellow-hover);
}

/* Accessibility and Smooth Transitions */
button, input, select {
    transition: all 0.3s ease;
}

button:hover, input:focus, select:focus {
    border-color: var(--yellow-main);
}

input:focus:not([type="radio"]) {
    outline: 3px solid var(--yellow-main);
}

p {
    font-family: 'Cinzel', serif;
    font-size: 1em;
    color: #333;
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Loading button style */
  #submit-btn.loading {
    position: relative;
    color: transparent; /* Hide text */
    pointer-events: none;
  }
  
  /* Spinner pseudo-element */
  #submit-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.2em;
    height: 1.2em;
    margin: -0.6em 0 0 -0.6em;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  
  @keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}