/* EDI Translator Custom Styles */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.footer {
    margin-top: 50px;
    border-top: 1px solid #dee2e6;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Table Styles */
.table {
    background-color: white;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #6c757d;
}

.table-hover tbody tr:hover {
    background-color: #f1f3f5;
    cursor: pointer;
}

/* Button Styles */
.btn {
    border-radius: 0.25rem;
    font-weight: 500;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Badge Styles */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Schema Detection Styles */
.schema-box {
    border: 2px dashed #dee2e6;
    padding: 20px;
    border-radius: 0.25rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
}

/* Mapping Canvas Styles */
.mapping-canvas {
    padding: 20px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Form Styles */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Alert Styles */
.alert {
    border-radius: 0.25rem;
}

/* Navigation Styles */
.nav-link {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s;
}

.nav-link:hover {
    color: white;
}

.nav-link i {
    margin-right: 0.25rem;
}

/* Modal Styles */
.modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    border-radius: 0.5rem;
}

/* Textarea Styles */
textarea.form-control {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
}

/* Feature Card Styles (Home Page) */
.card h5 {
    font-weight: 600;
    color: #212529;
}

.card-text {
    color: #6c757d;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .btn {
        font-size: 0.875rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-in-out;
}

/* File Upload Style */
input[type="file"] {
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    margin-right: 0.75rem;
}

input[type="file"]::file-selector-button:hover {
    background-color: #0b5ed7;
}

/* Success/Error States */
.table-success {
    background-color: #d1e7dd !important;
}

.table-danger {
    background-color: #f8d7da !important;
}

/* ── searchable-select directive ──────────────────────────────────────── */
.ss-wrapper {
    position: relative;
    display: block;
    width: 100%;
}
.ss-toggle {
    display: block;
    width: 100%;
    text-align: left;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ss-panel {
    position: absolute;
    z-index: 1050;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 220px;
    margin-top: 2px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.ss-options {
    max-height: 280px;
    overflow-y: auto;
}
.ss-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 12px;
    color: #212529;
    text-decoration: none;
    border: none;
    border-bottom: 1px solid #f1f3f5;
    background: transparent;
    cursor: pointer;
    font: inherit;
}
.ss-option:last-child { border-bottom: none; }
.ss-option:hover,
.ss-option:focus {
    background: #e8f0fe;
    color: #0d6efd;
    outline: none;
}
.ss-option-active {
    background: #cfe2ff;
    font-weight: 600;
}
.ss-option-clear {
    font-style: italic;
}
.ss-label { font-size: 14px; }
.ss-sub   { color: #6c757d; font-size: 12px; }
.ss-empty { font-style: italic; }
