/* getaCert.com — custom styles (Bootstrap 5 handles the rest) */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

pre {
    white-space: pre-wrap;
    word-break: break-all;
}

.card {
    border-radius: 0.5rem;
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 0.02em;
}

.navbar .nav-link {
    font-size: 1.1rem;
    padding: 0.6rem 1rem;
    font-weight: 500;
}

/* Blob viewer */
.blob-content textarea {
    font-size: 0.8rem;
    line-height: 1.4;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    resize: vertical;
}

/* ===== Wizard step indicator ===== */
.wizard-steps {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    counter-reset: step;
}
.wizard-steps li {
    flex: 1;
    position: relative;
    text-align: center;
    padding-top: 2.8rem;
    font-size: 0.85rem;
    color: #adb5bd;
    font-weight: 500;
    cursor: default;
    transition: color 0.25s;
}
.wizard-steps li.clickable { cursor: pointer; }
.wizard-steps li.clickable:hover { color: #6c757d; }
.wizard-steps li::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    font-weight: 700;
    font-size: 0.95rem;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    transition: all 0.3s ease;
}
.wizard-steps li::after {
    content: '';
    position: absolute;
    top: 1.2rem;
    left: calc(-50% + 1.2rem);
    right: calc(50% + 1.2rem);
    height: 3px;
    background: #e9ecef;
    border-radius: 2px;
    transition: background 0.3s ease;
}
.wizard-steps li:first-child::after { display: none; }

/* Active step */
.wizard-steps li.active::before {
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.18);
}
.wizard-steps li.active { color: #0d6efd; font-weight: 600; }

/* Completed step */
.wizard-steps li.completed::before {
    content: '\2713';
    background: #198754;
    color: #fff;
}
.wizard-steps li.completed { color: #198754; }
.wizard-steps li.completed::after,
.wizard-steps li.active::after {
    background: #198754;
}

/* Error step indicator */
.wizard-steps li.has-error::before {
    content: '!';
    background: #dc3545;
    color: #fff;
}
.wizard-steps li.has-error { color: #dc3545; }

/* Step label (below the circle) */
.wizard-step-label {
    display: block;
}

/* ===== Wizard step content ===== */
.wizard-step {
    min-height: 16rem;
    animation: wizardFadeIn 0.3s ease;
}
@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wizard-step h5 {
    color: #343a40;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

/* ===== Review table ===== */
.review-table {
    border-collapse: separate;
    border-spacing: 0;
}
.review-table th {
    color: #6c757d;
    font-weight: 500;
    width: 35%;
    padding: 0.6rem 0.75rem;
    border-top: none;
    vertical-align: top;
}
.review-table td {
    font-weight: 600;
    padding: 0.6rem 0.75rem;
}
.review-table tr:last-child th,
.review-table tr:last-child td {
    border-bottom: none;
}

/* ===== Inline validation ===== */
.form-control.is-valid,
.form-select.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

/* Spinner in submit button */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    vertical-align: -0.125em;
}

/* ===== Mobile adjustments ===== */
@media (max-width: 576px) {
    .wizard-steps li {
        font-size: 0.75rem;
        padding-top: 2.4rem;
    }
    .wizard-steps li::before {
        width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
    }
    .wizard-steps li::after {
        top: 1rem;
        left: calc(-50% + 1rem);
        right: calc(50% + 1rem);
    }
    .wizard-step {
        min-height: 12rem;
    }
}

/* ===== Print styles ===== */
@media print {
    .navbar, footer, .btn, .blob-toggle { display: none !important; }
    .blob-content { display: block !important; }
    .blob-content textarea {
        border: 1px solid #ccc;
        font-size: 7pt;
        height: auto !important;
    }
    .card { break-inside: avoid; }
}
