﻿
/* Color Theme Variables */
:root {
    --km-red: #c8102e;
    --km-red-dark: #a00d24;
    --km-red-light: #e8132f;
    --km-gray-dark: #2c3e50;
    --km-gray-medium: #34495e;
    --km-gray-light: #ecf0f1;
    --km-accent: #3498db;
}

/* Header */
.enc-header {
    background: linear-gradient(135deg, var(--km-red) 0%, var(--km-red-dark) 100%);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Logo */
.km-logo {
    height: 40px;
}

/* Main Form Card Header */
.card > .card-header:first-child {
    background: linear-gradient(135deg, var(--km-gray-dark) 0%, var(--km-gray-medium) 100%);
    color: #fff;
    border-bottom: 3px solid var(--km-red);
    padding: 15px 20px;
}

    .card > .card-header:first-child h2 {
        margin: 0;
        font-size: 1.5rem;
        font-weight: 600;
    }

/* Section Card Headers */
.section-card > .card-header {
    background: linear-gradient(135deg, var(--km-red) 0%, var(--km-red-dark) 100%);
    color: #fff;
    font-weight: 600;
    padding: 12px 20px;
    border-bottom: none;
    border-radius: 0;
}

.section-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

    .section-card > .card-body {
        background-color: #fff;
        padding: 25px;
    }

    /* Alternative Section Header Style (for variety) */
    .section-card.alt-style > .card-header {
        background: linear-gradient(135deg, var(--km-gray-dark) 0%, var(--km-gray-medium) 100%);
        border-left: 4px solid var(--km-red);
    }

/* Form spacing */
.form-label {
    font-weight: 500;
    color: var(--km-gray-dark);
}

/* Form Control Focus State */
.form-control:focus,
.form-select:focus {
    border-color: var(--km-red);
    box-shadow: 0 0 0 0.2rem rgba(200, 16, 46, 0.25);
}

/* Datepicker styling for Bootstrap 5 compatibility */
.datepicker {
    z-index: 1055 !important;
}

/* Wizard Stepper Styles */
.wizard-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0;
    list-style: none;
    position: relative;
}

    .wizard-stepper::before {
        content: '';
        position: absolute;
        top: 20px;
        left: 0;
        right: 0;
        height: 2px;
        background-color: #dee2e6;
        z-index: 0;
    }

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    cursor: pointer;
}

.wizard-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #dee2e6;
}

.wizard-step.active .wizard-step-icon {
    background-color: var(--km-red);
    color: #fff;
    box-shadow: 0 0 0 2px var(--km-red);
}

.wizard-step.completed .wizard-step-icon {
    background-color: #198754;
    color: #fff;
    box-shadow: 0 0 0 2px #198754;
}

.wizard-step.error .wizard-step-icon {
    background-color: #dc3545;
    color: #fff;
    box-shadow: 0 0 0 2px #dc3545;
}

.wizard-step-label {
    font-size: 0.75rem;
    text-align: center;
    color: #6c757d;
    max-width: 100px;
}

.wizard-step.active .wizard-step-label {
    color: var(--km-red);
    font-weight: 600;
}

.wizard-step.completed .wizard-step-label {
    color: #198754;
}

/* Wizard Content */
.wizard-content {
    min-height: 400px;
}

.wizard-section {
    display: none;
}

    .wizard-section.active {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

/* Required field indicator */
.form-label.required::after {
    content: " *";
    color: var(--km-red);
}

/* Validation styles */
.is-invalid {
    border-color: #dc3545 !important;
}

.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
}

.is-invalid ~ .invalid-feedback,
.was-validated .form-control:invalid ~ .invalid-feedback {
    display: block;
}

/* Progress bar */
.wizard-progress {
    height: 6px;
    background-color: #dee2e6;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--km-red) 0%, var(--km-red-light) 100%);
    transition: width 0.3s ease;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--km-red) 0%, var(--km-red-dark) 100%);
    border: none;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, var(--km-red-light) 0%, var(--km-red) 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
    }

    .btn-primary:active,
    .btn-primary:focus {
        background: var(--km-red-dark);
        box-shadow: 0 0 0 0.2rem rgba(200, 16, 46, 0.5);
    }

.btn-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    border: none;
}

    .btn-success:hover {
        background: linear-gradient(135deg, #1ea362 0%, #198754 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
    }

/* Sub-section headers (h6 elements) */
.card-body h6 {
    color: var(--km-gray-dark);
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--km-red);
    margin-bottom: 15px;
    display: inline-block;
}

/* Alert customization */
.alert-info {
    background: linear-gradient(135deg, #e8f4fc 0%, #d6eaf8 100%);
    border: 1px solid #3498db;
    border-left: 4px solid #3498db;
}

.alert-success {
    background: linear-gradient(135deg, #e8f8f0 0%, #d4efdf 100%);
    border: 1px solid #198754;
    border-left: 4px solid #198754;
}

/* Table styling */
.table thead th {
    background-color: var(--km-gray-light);
    color: var(--km-gray-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--km-red);
}

/* Horizontal rule styling */
hr {
    border-color: #dee2e6;
    opacity: 0.5;
}

/* Checkbox and Radio styling */
.form-check-input:checked {
    background-color: var(--km-red);
    border-color: var(--km-red);
}

.form-check-input:focus {
    border-color: var(--km-red);
    box-shadow: 0 0 0 0.2rem rgba(200, 16, 46, 0.25);
}

/* Toast styling */
.toast-header.bg-danger {
    background: linear-gradient(135deg, var(--km-red) 0%, var(--km-red-dark) 100%) !important;
}

.select2-container {
    width: 100% !important;
}

    .select2-container .select2-selection--single {
        height: calc(1.5em + .75rem + 2px);
        border: 1px solid #ced4da;
        border-radius: .25rem;
    }

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + .75rem + 2px);
    padding-left: .75rem;
    color: #495057;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + .75rem + 2px);
}

.select2-container--default .select2-selection--single.is-invalid,
select.is-invalid + .select2-container .select2-selection--single {
    border-color: #dc3545;
}

/* Wizard Progress Bar */
.wizard-progress-bar {
    width: 25%;
}

/* Other encroachment type input */
#txtOther {
    display: none;
}

/* Section 2 Validation Message */
#section2ValidationMsg {
    display: none;
}

/* Section 4 Required Badge */
#section4RequiredBadge {
    display: none;
}

/* Section 4 Installation Method Error */
#section4InstMethodError {
    display: none;
}

/* Section 4 Crossing Type Error */
#section4CrossingTypeError {
    display: none;
}

/* Section 4 Angle Error */
#section4AngleError {
    display: none;
}

/* Section 4 Clearance Error */
#section4ClearanceError {
    display: none;
}

/* Attachment Required Message */
#attachmentRequiredMsg {
    display: none;
}

/* Vehicle Crossing Diagram 1 */
.vehicle-crossing-diagram-1 {
    max-height: 650px;
    height: 500px;
}

/* Vehicle Crossing Diagram 2 */
.vehicle-crossing-diagram-2 {
    max-height: 450px;
    height: 300px;
}

/* reCAPTCHA v2 Error */
#recaptchaV2Error {
    display: none;
}

/* Submit Button */
#btnSubmit {
    display: none;
}
