/* Main stylesheet for UDT XML Generator */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Layout containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Input section styles */
.input-section textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    position: relative;
}

.input-section textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Text area with highlighting overlay */
.input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.highlight-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    pointer-events: none;
    overflow: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: transparent;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 0;
    margin: 0;
    background: transparent;
    z-index: 2;
}

.input-wrapper textarea {
    position: relative;
    z-index: 1;
    background: transparent;
}

/* Error line highlighting */
.error-line {
    background-color: rgba(231, 76, 60, 0.15);
    border-left: 3px solid #e74c3c;
    margin: 0;
    padding: 0;
    display: inline;
}

.nulltype-error-line {
    background-color: rgba(255, 193, 7, 0.2);
    border-left: 3px solid #ffc107;
    margin: 0;
    padding: 0;
    display: inline;
}

/* Button styles */
.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.btn-success {
    background-color: #27ae60;
}

.btn-success:hover {
    background-color: #229954;
}

/* Configuration table styles */
.config-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.config-table th,
.config-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.config-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.config-table tr:hover {
    background-color: #f8f9fa;
}

/* Checkbox styles */
.checkbox-container {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
    width: 60px; /* Narrower width since no text labels */
    padding: 12px;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0 auto;
    display: block;
}

/* Column width constraints */
.field-name-column {
    width: 35%;
    max-width: 200px;
    word-wrap: break-word;
}

/* Field name input styling */
.field-name-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.field-name-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.field-name-input:hover {
    border-color: #007bff;
}

/* Global prefix section styling */
.global-prefix-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.global-prefix-section .form-group {
    margin-bottom: 0;
}

.global-prefix-section label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.prefix-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.prefix-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.prefix-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.apply-prefix-btn, .clear-prefix-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.apply-prefix-btn {
    background-color: #28a745;
    color: white;
}

.apply-prefix-btn:hover {
    background-color: #218838;
}

.apply-prefix-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.clear-prefix-btn {
    background-color: #dc3545;
    color: white;
}

.clear-prefix-btn:hover {
    background-color: #c82333;
}

.prefix-help {
    color: #6c757d;
    font-size: 12px;
    margin-top: 8px;
    display: block;
    line-height: 1.4;
}

.data-type-column {
    width: 15%;
    max-width: 100px;
}

/* Settings panel styles */
.settings-panel {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 15px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.settings-panel.expanded {
    display: block;
}

.settings-panel h4 {
    margin-bottom: 15px;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
        padding-top: 15px;
        padding-bottom: 15px;
    }
}

.settings-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.settings-field {
    flex: 1;
    min-width: 150px;
}

.settings-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.settings-field input,
.settings-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.settings-field input:focus,
.settings-field select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.settings-field input:invalid {
    border-color: #e74c3c;
}

.settings-field input:invalid:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* Enhanced validation error styling */
.settings-field input.error,
.settings-field select.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
    background-color: #fdf2f2;
}

.field-error {
    color: #e74c3c;
    font-size: 0.85em;
    margin-top: 4px;
    display: block;
}

.field-message {
    margin-bottom: 15px;
    font-size: 0.9em;
    border-radius: 4px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Settings button styling */
.settings-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background-color: #e9ecef;
    transform: scale(1.1);
}

.settings-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.settings-btn:active {
    transform: scale(0.95);
}

/* Legacy support for existing button styling */
.config-table button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.config-table button:hover {
    background-color: #e9ecef;
}

.config-table button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Error and success messages */
.message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Loading States */
.loading-progress-text {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    color: #6B7280;
    font-weight: normal;
}

.loading-progress-bar {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 1px;
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    background-color: #3498db;
    transition: width 0.3s ease;
    border-radius: 1px;
}

/* Processing Status Display */
.processing-status {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 16px;
    margin: 16px 0;
}

.processing-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.processing-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.processing-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-weight: bold;
    border-radius: 50%;
}

.processing-step-text {
    flex: 1;
}

/* Processing step states */
.processing-step-pending {
    color: #9CA3AF;
}

.processing-step-pending .processing-step-icon {
    color: #D1D5DB;
    background-color: #F9FAFB;
}

.processing-step-active {
    color: #3B82F6;
    font-weight: 500;
}

.processing-step-active .processing-step-icon {
    color: #3B82F6;
    background-color: rgba(59, 130, 246, 0.1);
    animation: pulse 1.5s infinite;
}

.processing-step-completed {
    color: #10B981;
}

.processing-step-completed .processing-step-icon {
    color: #10B981;
    background-color: rgba(16, 185, 129, 0.1);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Button loading state improvements */
.btn:disabled {
    position: relative;
    cursor: not-allowed;
}

.btn .loading-progress-text {
    color: rgba(255, 255, 255, 0.8);
}

.btn-success .loading-progress-text {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments for loading states */
@media (max-width: 768px) {
    .processing-status {
        padding: 12px;
        margin: 12px 0;
    }
    
    .processing-step {
        font-size: 13px;
        gap: 10px;
    }
    
    .processing-step-icon {
        width: 18px;
        height: 18px;
    }
    
    .loading-progress-text {
        font-size: 11px;
    }
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .settings-row {
        flex-direction: column;
    }
    
    .config-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .config-table th,
    .config-table td {
        padding: 12px 8px;
        min-width: 80px;
    }
    
    /* Make checkboxes larger for touch */
    .checkbox-container {
        width: auto;
        padding: 16px 8px;
    }
    
    .checkbox-container input[type="checkbox"] {
        width: 24px;
        height: 24px;
        margin: 0 auto;
    }
    
    /* Make buttons touch-friendly */
    .btn {
        min-height: 44px;
        font-size: 16px;
        padding: 12px 20px;
    }
    
    .settings-btn {
        min-height: 44px;
        min-width: 44px;
        font-size: 18px;
        padding: 12px;
    }
    
    .config-table button {
        min-height: 44px;
        min-width: 44px;
        font-size: 18px;
        padding: 8px;
    }
    
    /* Improved textarea for mobile */
    .input-section textarea {
        min-height: 150px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .settings-panel {
        margin: 10px 0;
    }
    
    .settings-field input,
    .settings-field select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }
}

/* Additional mobile improvements */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .config-table {
        border: 0;
    }
    
    .config-table thead {
        display: none;
    }
    
    .config-table tr {
        display: block;
        margin-bottom: 10px;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background-color: #f8f9fa;
    }
    
    .config-table td {
        display: block;
        text-align: left;
        border: none;
        padding: 5px 0;
        position: relative;
        padding-left: 40%;
    }
    
    .config-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 35%;
        text-align: left;
        font-weight: bold;
    }
    
    .checkbox-container {
        justify-content: flex-start;
        padding-left: 40%;
    }
}

/* XML Preview enhancements */
.xml-metadata {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.metadata-label {
    font-weight: 600;
    color: #495057;
}

.metadata-value {
    color: #28a745;
    font-weight: 500;
}

#xmlContent {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Courier New', Monaco, monospace;
    font-size: 12px;
    line-height: 1.4;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Enhanced responsive design for XML preview */
@media (max-width: 768px) {
    .metadata-grid {
        grid-template-columns: 1fr;
    }
    
    #xmlContent {
        font-size: 11px;
        max-height: 300px;
    }
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    max-width: 400px;
    min-width: 300px;
    overflow: hidden;
    pointer-events: auto;
    position: relative;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}

.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-exit {
    transform: translateX(100%);
    opacity: 0;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
}

.toast-icon {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #374151;
}

.toast-close {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: color 0.15s ease;
}

.toast-close:hover {
    color: #6B7280;
    background-color: rgba(0, 0, 0, 0.05);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
    animation: progress linear;
    transform-origin: left;
}

@keyframes progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Toast variants */
.toast-success {
    border-left: 4px solid #10B981;
}

.toast-success .toast-icon {
    color: #10B981;
    background-color: rgba(16, 185, 129, 0.1);
}

.toast-error {
    border-left: 4px solid #EF4444;
}

.toast-error .toast-icon {
    color: #EF4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.toast-warning {
    border-left: 4px solid #F59E0B;
}

.toast-warning .toast-icon {
    color: #F59E0B;
    background-color: rgba(245, 158, 11, 0.1);
}

.toast-info {
    border-left: 4px solid #3B82F6;
}

.toast-info .toast-icon {
    color: #3B82F6;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Modal System */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-container.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-dialog {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.modal-close:hover {
    color: #6B7280;
    background-color: rgba(0, 0, 0, 0.05);
}

.modal-body {
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;
}

.modal-body p {
    margin: 0 0 12px 0;
    color: #374151;
    line-height: 1.5;
}

.modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #E5E7EB;
}

/* Modal variants */
.modal-error .modal-header {
    border-bottom: 3px solid #EF4444;
}

.modal-error .modal-title {
    color: #EF4444;
}

.modal-warning .modal-header {
    border-bottom: 3px solid #F59E0B;
}

.modal-warning .modal-title {
    color: #F59E0B;
}

.modal-info .modal-header {
    border-bottom: 3px solid #3B82F6;
}

.modal-info .modal-title {
    color: #3B82F6;
}

/* Error details styling */
.error-details {
    margin-top: 16px;
}

.error-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #6B7280;
    padding: 8px 0;
    border-bottom: 1px solid #E5E7EB;
    outline: none;
}

.error-details summary:hover {
    color: #374151;
}

.error-stack {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    color: #374151;
    font-family: 'Courier New', Monaco, monospace;
    font-size: 12px;
    line-height: 1.4;
    margin: 8px 0 0 0;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    white-space: pre-wrap;
}

/* Inline Error Styling */
.inline-error {
    color: #EF4444;
    font-size: 12px;
    margin-top: 4px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.field-error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1) !important;
}

/* Mobile responsiveness for notifications */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        max-width: none;
        min-width: auto;
    }
    
    .modal-container {
        padding: 10px;
    }
    
    .modal-dialog {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Utility classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

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

.mb-20 {
    margin-bottom: 20px;
}

/* UDT Name Input Section */
.udt-name-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.udt-name-section h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.udt-name-section p {
    margin: 0 0 15px 0;
    color: #6c757d;
}

.udt-name-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.udt-name-label {
    font-weight: 600;
    color: #495057;
    min-width: 120px;
    margin: 0;
}

.udt-name-input {
    flex: 1;
    min-width: 250px;
    padding: 10px 12px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    background-color: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.udt-name-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.udt-name-input:invalid {
    border-color: #dc3545;
}

.udt-name-input:invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.udt-name-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.udt-name-help {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.udt-name-help small {
    display: block;
}

/* Auto-detect button styling */
#detectNameBtn {
    background-color: #6c757d;
    white-space: nowrap;
    min-width: 110px;
}

#detectNameBtn:hover {
    background-color: #5a6268;
}

/* Input validation styling */
.udt-name-input.valid {
    border-color: #28a745;
}

.udt-name-input.valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Responsive design for UDT name section */
@media (max-width: 768px) {
    .udt-name-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .udt-name-label {
        min-width: auto;
        margin-bottom: 5px;
    }

    .udt-name-input {
        min-width: auto;
        margin-bottom: 10px;
    }

    #detectNameBtn {
        align-self: center;
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .udt-name-section {
        padding: 15px;
    }

    .udt-name-section h3 {
        font-size: 1.1rem;
    }

    #detectNameBtn {
        width: 100%;
        min-width: auto;
    }
}

/* Footer styles */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: 40px;
    padding: 20px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-section {
    display: flex;
    align-items: center;
}

.version-info {
    font-size: 0.85rem;
    color: #6c757d;
    font-family: 'Courier New', monospace;
    background: rgba(108, 117, 125, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.copyright {
    font-size: 0.85rem;
    color: #6c757d;
}

.contact-link {
    font-size: 0.85rem;
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.contact-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .footer-section {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 15px 0;
    }

    .version-info,
    .copyright,
    .contact-link {
        font-size: 0.8rem;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.scroll-to-top:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments for scroll to top button */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 20px;
    }
}