/**
 * GSAT Shared Styles
 *
 * Consolidated utility classes replacing inline styles across templates.
 * Include this file in the main layout to enable reuse.
 */

/* ==========================================================================
   Utility Classes (replacing inline styles)
   ========================================================================== */

.h-full {
    height: 100%;
}

.mt-10 {
    margin-top: 10px;
}

.main-content {
    height: 100%;
    padding-top: 40px;
}

.text-center-middle {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
}

/* ==========================================================================
   Full-screen page containers
   Ensures verifikasi, register, instruction, and stage_end pages
   fill the entire viewport height.
   ========================================================================== */

.verifikasi,
.register,
.instruction {
    min-height: 100vh;
    box-sizing: border-box;
}

.fullscreen-body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.fullscreen-body > main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fullscreen-body > main > section,
.fullscreen-body > main > div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fullscreen-body .row.h-full {
    flex: 1;
}

.fullscreen-body .verifikasi-center,
.fullscreen-body .instruction-right,
.fullscreen-body .register-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fullscreen-body .footer-info {
    margin-top: auto;
    padding-top: 20px;
}

/* ==========================================================================
   Component Classes
   ========================================================================== */

.footer-info {
    margin-bottom: 0;
    color: #fff;
    text-align: center;
}

.message-warning {
    width: auto;
    text-align: left;
    margin: 5px 0;
    color: red;
    display: none;
}

.message-success {
    width: auto;
    text-align: left;
    margin: 5px 0;
    color: green;
    display: none;
}

.submit-loader {
    margin: 5px 10px;
    display: none;
}

.text-loader {
    color: blue;
}

.radio-group {
    background: transparent;
    border: none;
    padding-left: 0;
    margin-bottom: 0;
}

.error {
    color: red;
}

/* ==========================================================================
   UX-01: Timer Warning
   ========================================================================== */

.timer-warning {
    animation: timer-pulse 0.5s ease-in-out infinite alternate;
    color: #dc3545 !important;
    font-weight: bold;
}

@keyframes timer-pulse {
    from { opacity: 1; }
    to { opacity: 0.4; }
}

/* ==========================================================================
   UX-02: Inline Validation
   ========================================================================== */

.field-error {
    border-color: #dc3545 !important;
}

.field-success {
    border-color: #28a745 !important;
}

.inline-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* ==========================================================================
   UX-03: Progress Indicator
   ========================================================================== */

.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.progress-indicator .step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #999;
    font-weight: bold;
    font-size: 12px;
}

.progress-indicator .step.active {
    background: #dc3545;
    color: #fff;
}

.progress-indicator .step.completed {
    background: #28a745;
    color: #fff;
}

.progress-indicator .step-line {
    width: 30px;
    height: 2px;
    background: #e0e0e0;
}

.progress-indicator .step-line.completed {
    background: #28a745;
}

/* ==========================================================================
   A11Y: Accessibility
   ========================================================================== */

input:focus,
select:focus,
button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
