:root {
    --primary-color: #b4b9c5;
    --secondary-color: #CC3300;
    --bg-light: #EBEBEB;
    --info-bg: #eee9e9;
    --image-transition-duration: 2s;
    --box-shadow: 0 5px 20px 1px rgba(20, 20, 71, 0.2);
    --border-radius: 10px;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header-section {
    margin-bottom: 0.5rem;
    text-align: center; /* Ensure center alignment */
}

.main-title {
    background-color: var(--bg-light);
    color: rgb(58, 19, 19);
    padding: 0.75rem;
    font-weight: bold;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 0;
    text-decoration: underline;
    word-wrap: break-word; /* Allows text to break when necessary */
    overflow-wrap: break-word; /* For additional support in wrapping text */
}

/* Card Styles */
.info-card, .form-card {
    padding: 1.2rem; 
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: auto;  
    margin-bottom: 0.55rem; 
}

.info-card {
    background-color: var(--info-bg);
    color: #000000;
}

.form-card {
    background-color: #fff;
}

/* Form Styles */
.form-title {
    background-color: var(--bg-light);
    color: var(--secondary-color);
    padding: 0.5rem;
    text-align: center;
    border-radius: 5px;
    margin-bottom: 0.55rem;  
    font-size: 1rem;  
}

.form-label {
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #333;
}

.form-control, .form-select {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.4rem;
    width: 100%;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(180, 185, 197, 0.25);
}

/* Image Section Styles */
.image-section {
    position: relative;
    width: 100%;
    height: 250px; 
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.2rem;  
}

.image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform var(--image-transition-duration) ease-in-out;
}

.image-container img {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    opacity: 0;
    transition: opacity var(--image-transition-duration) ease-in-out;
}

.image-container img.active {
    opacity: 1;
}

/* Button Styles */
.btn-primary {
    background-color: var(--secondary-color);
    border: none;
    padding: 0.5rem 1.25rem; 
    border-radius: 5px;
    color: white;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #a32800;
}

.btn-primary:disabled {
    background-color: #ffcccc;
    cursor: not-allowed;
}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out;
}

.preloader.loaded {
    opacity: 0;
    pointer-events: none;
}

/* Loading Animation */
.loading-circles {
    position: relative;
    width: 80px;  
    height: 80px; 
}

.circle {
    position: absolute;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: rotate 2s linear infinite;
}

.circle-outer {
    width: 80px;
    height: 80px;
    border-top-color: rgb(0, 119, 255);
    animation-duration: 2s;
}

.circle-middle {
    width: 60px; 
    height: 60px; 
    top: 10px;
    left: 10px;
    border-top-color: red;
    animation-duration: 1.6s;
    animation-direction: reverse;
}

.circle-inner {
    width: 30px; 
    height: 30px; 
    top: 25px;
    left: 25px;
    border-top-color: green;
    animation-duration: 1.2s;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.modal-header {
    background-color: var(--bg-light);
    border-bottom: none;
}

.modal-footer {
    border-top: none;
}

/* Footer Styles */
.footer-section {
    color: #d30000;
    padding: 0.75rem 0;
    text-align: center;
    margin-top: auto;
}

.footer-section p {
    margin: 0;
    font-size: 1.5rem;  
}

/* Container Styles */
.container-fluid {
    padding: 0.5rem; 
    flex: 1;
}

/* Instructions List Styles */
.info-card ol {
    padding-left: 1rem;  
}

.info-card li {
    margin-bottom: 0.5rem;
}

.note-section {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 5px;
}
.otp-input {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}
.otp-input input {
    width: 50px;
    height: 50px;
    margin: 0 8px;
    text-align: center;
    font-size: 1.5rem;
    border: 2px groove #404086;
    border-radius: 12px;
    background-color: rgba(252, 252, 252, 0.8);
    color: #3b1111;
    transition: all 0.3s ease;
}
.otp-input input:focus {
    border-color: #A556F6;
    box-shadow: 0 0 0 2px rgba(166, 86, 246, 0.3);
    outline: none;
}
.otp-input input::-webkit-outer-spin-button,
.otp-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.otp-input input[type=number] {
    -moz-appearance: textfield;
}
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    -webkit-animation: .75s linear infinite spinner-border;
    animation: .75s linear infinite spinner-border;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.resend-link {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

.resend-link:hover {
    color: #0056b3;
}
/* ==== OTP FIX : FORCE SINGLE ROW ==== */

.otp-box-wrapper {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;   /* 🔥 MOST IMPORTANT */
}

.otp-box {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    max-width: 48px;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    border: 2px solid #1f2a6d;
    text-align: center;

    font-size: 18px;
    font-weight: 600;

    padding: 0 !important;
    margin: 0 !important;
}

/* remove bootstrap input full width effect */
.otp-box.form-control {
    width: 48px !important;
}
