/* MikroTik Script Generator Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
}

.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    font-weight: 600;
    padding: 15px 20px;
}

.list-group-item {
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    padding: 12px 20px;
}

.list-group-item:hover {
    background-color: #f0f7ff;
    border-left-color: #0d6efd;
    transform: translateX(2px);
}

.list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    border-left-color: #0d6efd;
}

#script-output {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    background-color: #2b2b2b;
    color: #f8f8f2;
    resize: vertical;
    min-height: 300px;
    border: 1px solid #495057;
    border-radius: 4px;
    padding: 15px;
}

.port-forward-entry,
.queue-rule,
.vpn-user,
.vlan-entry {
    background-color: #f8f9fa;
    transition: all 0.2s;
    border: 1px solid #dee2e6;
}

.port-forward-entry:hover,
.queue-rule:hover,
.vpn-user:hover,
.vlan-entry:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.remove-port-forward,
.remove-queue,
.remove-vpn-user,
.remove-vlan {
    padding: 0.2rem 0.5rem;
    font-size: 12px;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Notification styles */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Template sections */
#templates {
    display: none;
}

/* Form validation styles */
.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }
    
    .list-group-item {
        padding: 10px 15px;
    }
    
    #script-output {
        font-size: 12px;
        min-height: 200px;
    }
    
    .btn {
        margin-bottom: 5px;
    }
}

/* Animation for form transitions */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Custom scrollbar for script output */
#script-output::-webkit-scrollbar {
    width: 8px;
}

#script-output::-webkit-scrollbar-track {
    background: #3c3c3c;
}

#script-output::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

#script-output::-webkit-scrollbar-thumb:hover {
    background: #888;
}