/* BNBP FORM - COMPACT & ELEGANT */
:root {
    --primary: #088178;
    --dark: #088178;
    --gray-bg: #f8f9fa;
    --gray-text: #666;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }

.multistep-form-container {
    padding: 20px;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f9fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.multistep-form-wrapper {
    background: white;
    width: 100%;
    max-width: 750px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.multistep-form-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.multistep-form-header h1 { margin: 0; font-size: 24px; font-weight: 700; }
.multistep-form-header p { margin: 5px 0 0; font-size: 13px; opacity: 0.9; }

.multistep-progress {
    padding: 18px 30px;
    background: var(--gray-bg);
    border-bottom: 1px solid #ddd;
}

.progress {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--dark));
    height: 100%;
    transition: width 0.3s ease;
}

.progress-text { text-align: center; font-size: 12px; color: var(--gray-text); font-weight: 600; }

#multistepForm { padding: 28px; }

.form-step { animation: fadeIn 0.2s ease-in; }
.form-step.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.step-title { font-size: 18px; font-weight: 700; color: #222; margin-bottom: 18px; border-bottom: 2px solid var(--primary); padding-bottom: 8px; }

.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: #333; margin-bottom: 4px; }
.required { color: #e74c3c; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.single { grid-template-columns: 1fr; }

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 13px;
    background: #fafafa;
    transition: 0.2s;
    color: #333;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.08);
}

.form-check {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    cursor: pointer;
    transition: 0.2s;
}

.form-check:hover { background: var(--gray-bg); border-color: var(--primary); }
.form-check input { margin-right: 8px; cursor: pointer; }
.form-check label { margin: 0; cursor: pointer; font-size: 13px; }

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary { background: linear-gradient(135deg, var(--primary), var(--dark)); color: white; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,102,204,0.3); }

.btn-secondary { background: #e8e8e8; color: #333; }
.btn-secondary:hover { background: #d8d8d8; }

.form-controls { display: flex; gap: 10px; justify-content: space-between; margin-top: 22px; padding-top: 18px; border-top: 1px solid #ddd; }

.alert { padding: 10px 12px; border-radius: var(--radius); font-size: 12px; margin-bottom: 14px; border-left: 4px solid; }
.alert-danger { background: #fdeaea; border-color: #e74c3c; color: #c0392b; }
.alert-success { background: #eafaf1; border-color: #27ae60; color: #229954; }

.form-control.is-invalid { border-color: #e74c3c; background: #fdeaea; }
.invalid-feedback { font-size: 11px; color: #e74c3c; margin-top: 2px; }

/* ==================== FILE UPLOAD STYLING (STEP 6) ==================== */

.file-types-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.file-type-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4ff 100%);
    border: 2px dashed var(--primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-type-item:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
    border-color: var(--dark);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
    transform: translateY(-2px);
}

.file-type-item.has-file {
    background: linear-gradient(135deg, #d4f1ff 0%, #e8f5ff 100%);
    border-color: #27ae60;
    border-style: solid;
    border-width: 2px;
}

.file-type-item.has-file::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #27ae60;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.file-type-title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 8px;
    cursor: pointer;
}

.file-type-item:hover .file-type-title {
    color: var(--dark);
}

.document-file-input {
    display: none !important;
    pointer-events: none !important;
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

/* Upload icon */
.file-type-item::before {
    content: '📁';
    font-size: 28px;
    margin-bottom: 4px;
    display: block;
}

.file-type-item.has-file::before {
    content: '✓';
    font-size: 28px;
    color: #27ae60;
}

/* Uploaded files list */
.uploaded-files-container {
    margin-top: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.uploaded-files-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    margin-top: 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: #fafafa;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.1);
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.file-icon {
    font-size: 20px;
    min-width: 24px;
    text-align: center;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 11px;
    color: var(--gray-text);
    margin-top: 2px;
}

.file-remove-btn {
    padding: 4px 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: 8px;
}

.file-remove-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* Alert styling improvements */
.alert {
    margin-bottom: 16px;
    font-size: 13px;
    border-radius: var(--radius);
    padding: 12px 14px;
}

.alert-info {
    background: #e3f2fd;
    border-left: 4px solid var(--primary);
    color: #0066cc;
}

.alert-secondary {
    background: #f5f5f5;
    border-left: 4px solid #999;
    color: #333;
}

.text-muted {
    color: var(--gray-text);
    font-size: 12px;
}

/* Form navigation buttons */
.form-navigation {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 2px solid #f0f0f0;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-outline-secondary {
    border: 1px solid #999;
    background: white;
    color: #333;
}

.btn-outline-secondary:hover {
    background: #f5f5f5;
}

/* Input group styling */
.input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    overflow: hidden;
    background: #fafafa;
}

.input-group-text {
    padding: 8px 10px;
    background: #f0f0f0;
    border-right: 1px solid #ddd;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.input-group .form-control {
    border: none;
    border-radius: 0;
}

/* Form check styling */
.form-check-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

/* Success page styling */
.success-header {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.success-header h1 {
    margin: 10px 0 0 0;
    font-size: 28px;
}

.success-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
}

.success-content {
    padding: 24px;
}

.success-message {
    background: #f0f8f4;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
    margin-bottom: 18px;
}

.success-message h3 {
    margin-top: 0;
    color: #1e8449;
}

.success-message p {
    margin: 8px 0;
    font-size: 13px;
}

.success-steps {
    background: #faf9ff;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin-bottom: 18px;
}

.success-steps h4 {
    margin-top: 0;
    color: var(--dark);
}

.success-steps ol {
    margin: 0;
    padding-left: 18px;
}

.success-steps li {
    font-size: 13px;
    margin: 6px 0;
}

.success-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.success-actions a {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Modal styles for file dialog */
/* Removed - not needed for simplified file upload */

@media (max-width: 768px) {
    .file-types-list {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .file-type-item {
        min-height: 100px;
        padding: 12px 8px;
    }

    .file-type-item::before {
        font-size: 24px;
    }

    .file-type-title {
        font-size: 10px;
    }
}

@media (max-width: 640px) {
    .multistep-form-container { padding: 15px; }
    #multistepForm { padding: 18px; }
    .multistep-form-header { padding: 20px; }
    .multistep-form-header h1 { font-size: 20px; }
    .form-row { grid-template-columns: 1fr; gap: 12px; }
    .form-navigation { flex-direction: column; gap: 8px; }
    .btn { width: 100%; }
    .file-types-list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .file-type-item { min-height: 90px; padding: 10px; }
    .file-item-left { flex-direction: column; align-items: flex-start; }
    .file-remove-btn { margin-left: 0; margin-top: 8px; width: 100%; }
    .success-actions { flex-direction: column; }
}
